Page 1 of 1

Conflict with Smarty brackets - Is there a way to escape them?

Posted: Wed Aug 22, 2007 12:12 pm
by kendo451
I am attempting to use a Spry widget to make a collapsible food menu in a CMSMS content page.

The problem is that the Spry javascript uses the same kind of bracket as Smarty, so when I view the page generated by the template with the Spry Widget in it, Smarty attempts to parse the javascript instead of just outputting it.

Here is an example line:
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("HotDrinks", {contentIsOpen:false});

Is there a way to escape Smarty brackets so Smarty won't parse them?

Ken

Re: Conflict with Smarty brackets - Is there a way to escape them?

Posted: Wed Aug 22, 2007 12:15 pm
by alby
kendo451 wrote: I am attempting to use a Spry widget to make a collapsible food menu in a CMSMS content page.

The problem is that the Spry javascript uses the same kind of bracket as Smarty, so when I view the page generated by the template with the Spry Widget in it, Smarty attempts to parse the javascript instead of just outputting it.

Here is an example line:
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("HotDrinks", {contentIsOpen:false});

Is there a way to escape Smarty brackets so Smarty won't parse them?

Ken
Surround your code with:
{literal}
...........
{/literal}

Alby