I need to inline some javascript code into the Smarty template files and these {ldelim} {rdelim} things are killing me. Is there a way to tell smarty to ignore the markup for a block and just output it as is? Something similar to CDATA blocks in the xml?
Just in case: here is how simple javascript looks now:
$(function() {ldelim}
$( "#slides" ).accessNews({ldelim}
speed : "{$speed}",
slideBy : 1
{rdelim});
{rdelim});
creepy heh?
Re your update: You can use
{literal} .... insert content here {/literal}to turn off Smarty variable parsing for entire blocks.Old answer: I like to change the default delimiter characters to something else for this exact reason. (As far as I know, that can be done for the whole project only though, so you would have to see whether it’s for you.)
For example to
(just my personal favourite, use whatever suits you)
The variables to change are the
rightDelimiterandleftDelimiterproperties. Documentation