Conditional Comments and Smarty  Bottom

  • Hi,

    I'm trying to create a theme which includes the so-called "conditional comments" (http://www.javascrip…com/howto/cc3.shtml) for IE in it's templates.
    But it turns out that Smarty trips over the

    Code

    ]>
    part of the code.
    Is there a way to prevent Smarty/PnRender from trying to go through that problematic piece of code.
    Thanks!
  • Google has saved the day once again...
    surrounding the offending code with

    Code

    <!--[literal]--><--[/literal]-->

    was enough to remove the problem...
    Thanks anyway
  • Did you have to do anything special to get this to work ? I am trying the same thing, but I am getting an error that literal is not valid:

    Fatal error: Smarty error: [in modules/home.htm line 21]: syntax error: unrecognized tag 'literal' (Smarty_Compiler.class.php, line 583) in /usr/local/PostNuke/includes/classes/Smarty/Smarty.class.php on line 1095
  • Usually no - the literal stuff is in the Smarty core itself. Make sure you have the latest version that ships with PN (or newer if available).




    --
    "He is not dangerous, he just wants to play...."
  • I'm not sure if it's relevant, but the above quoted literal statement is missing the exclamation mark from the close tag.

    --
    Under Construction!
  • Yes it is, indeed. Thanks for pointing this out.



    --
    "He is not dangerous, he just wants to play...."
  • Thanks I had missed that. What's weird though is the error was on the opening 'literal', not the close, so I wasn't even looking at the tag.
  • I find smaarty to work kind of like SQL for obscure errors... the problem is usually just before where it finds issue.

    --
    Under Construction!

This list is based on users active over the last 60 minutes.