Smarty - Javascript & CSS

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • cshih16@yahoo.com

    Smarty - Javascript & CSS

    Can we contain Javascript and CSS codings in .tpl?

    My tpl file contains Javascript and CSS, but I got syntax error:
    unrecognized tag

    Anyway to make it work? because really need those javascript and css in
    tpl..

    Thanks much!
    Ching

  • tomasvf@gmail.com

    #2
    Re: Smarty - Javascript & CSS

    You must wrap your code between {literal} labels
    {literal}
    function foo() {
    // my javascript code
    }
    {/literal}

    Comment

    Working...