Skip to content
Umakant Patil edited this page Oct 13, 2017 · 2 revisions

Tag is not supported anymore

The {javascript} tags allow JavaScript code to be embedded directly into the template.

All the variables assigned to the template are available within {javascript}. To create a new variable, add it to the $this object (e.g. $this.foo = 'bar')

{$foo = 'bar'}

{javascript}
    if (foo == 'bar')
    {
        foo = 'buh';
        $this.newVar = 'new';
    }
{/javascript}

foo: {$foo}
newVar: {$newVar}

output:

foo: buh
newVar: new
Clone this wiki locally