Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Conditional Comments and Smarty
  • Posted: 01.03.2007, 02:48
     
    Sepulman
    rank:
    Freshman Freshman
    registered:
     February 2007
    Status:
    offline
    last visit:
    28.02.07
    Posts:
    2
    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!
  • Posted: 01.03.2007, 03:10
     
    Sepulman
    rank:
    Freshman Freshman
    registered:
     February 2007
    Status:
    offline
    last visit:
    28.02.07
    Posts:
    2
    Google has saved the day once again...
    surrounding the offending code with

    Code

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

    was enough to remove the problem...
    Thanks anyway
  • Posted: 22.08.2007, 12:25
     
    ccandreva
    rank:
    Helper Helper
    registered:
     September 2005
    Status:
    offline
    last visit:
    18.09.08
    Posts:
    145
    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
  • Posted: 22.08.2007, 13:19
     
    Landseer
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    12.11.08
    Posts:
    848
    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...."
  • Posted: 22.08.2007, 15:10
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    online
    Posts:
    1675
    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!
  • Posted: 22.08.2007, 19:13
     
    Landseer
    rank:
    Steering Committee Steering Committee
    registered:
     January 2003
    Status:
    offline
    last visit:
    12.11.08
    Posts:
    848
    Yes it is, indeed. Thanks for pointing this out.



    --
    "He is not dangerous, he just wants to play...."
  • Posted: 22.08.2007, 21:07
     
    ccandreva
    rank:
    Helper Helper
    registered:
     September 2005
    Status:
    offline
    last visit:
    18.09.08
    Posts:
    145
    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.
  • Posted: 23.08.2007, 03:24
     
    Topiatic
    rank:
    Professional Professional
    registered:
     November 2003
    Status:
    online
    Posts:
    1675
    I find smaarty to work kind of like SQL for obscure errors... the problem is usually just before where it finds issue.

    --
    Under Construction!

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula