Page 1 of 1

I seem to be missing a variable

Posted: Thu Nov 20, 2008 8:16 pm
by Silvertiger
I am adding a Javascript (google translation) to the page just below the header, but when I add it the page errors out. I do know why, but I don't know the fix.

in the Java it uses a bracket { } to enclose some fo the java code, but in the TPL it uses that to express a variable. how can I change the code to place the actual { instead of interpreting it as an open bracket for a TPL variable? I did see some other variables called {ldelmiter} and {rdelimiter}, but i presume those are quotes or soemthing... any ideas?

Any help would be apprecaited.

Thanks,

Silver

Re: I seem to be missing a variable

Posted: Thu Nov 20, 2008 8:40 pm
by garvinhicking
Hi!

The FAQ on www.s9y.org mentions to use {ldelim} for { and {rdelim} for } - your assumption's correct.

The other way is to enclose your javascript in a {literal} block.

Regards,
Garvin

Posted: Thu Nov 20, 2008 11:44 pm
by Don Chambers
Just as Garvin mentions, I personally find {literal} to be far easier.... ie

Code: Select all

{literal}
    <script>blah blah</script>
{/literal}