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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
kendo451

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

Post 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
alby

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

Post 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
Locked

Return to “CMSMS Core”