Topic: Conditional Comments and Smarty
Sepulman
avatar
Freshman
Freshman
Posts: 2

Posted:
1.Mar 2007 - 02:48

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!
Sepulman
avatar
Freshman
Freshman
Posts: 2

Posted:
1.Mar 2007 - 03:10

Google has saved the day once again...
surrounding the offending code with

Code

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

was enough to remove the problem...
Thanks anyway
ccandreva
avatar
Helper
Helper
Posts: 145

Posted:
22.Aug 2007 - 12:25

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
Landseer
avatar
Developer
Developer
Posts: 852

Posted:
22.Aug 2007 - 13:19

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...."
Topiatic
avatar
Professional
Professional
Posts: 1680

Posted:
22.Aug 2007 - 15:10

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!
Landseer
avatar
Developer
Developer
Posts: 852

Posted:
22.Aug 2007 - 19:13

Yes it is, indeed. Thanks for pointing this out.



--
"He is not dangerous, he just wants to play...."
ccandreva
avatar
Helper
Helper
Posts: 145

Posted:
22.Aug 2007 - 21:07

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.
Topiatic
avatar
Professional
Professional
Posts: 1680

Posted:
23.Aug 2007 - 03:24

I find smaarty to work kind of like SQL for obscure errors... the problem is usually just before where it finds issue.

--
Under Construction!