Smarty to javascript. Is it possible?

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.
Post Reply
sturla69
Forum Members
Forum Members
Posts: 29
Joined: Fri Jan 19, 2007 9:24 am

Smarty to javascript. Is it possible?

Post by sturla69 »

Hi.

I'm trying to pass some (smarty)variables to a javascript, but cannot find a solution. I'm doing this in a specific module, but I guess the problem is global. Any tips on how to achieve this?
uniqu3

Re: Smarty to javascript. Is it possible?

Post by uniqu3 »

And would you mind explaining how you do it?
Where do you use your JavaScript?

{literal}
.... some javasdcript code{/literal}
{$your_smarty_var}
{literal}
.... the rest of your javascript...
{/literal}

or replace all curly brackets in your js { } with {ldelim} and {rdelim}, if it's not a huge chunk of js.
sturla69
Forum Members
Forum Members
Posts: 29
Joined: Fri Jan 19, 2007 9:24 am

Re: Smarty to javascript. Is it possible?

Post by sturla69 »

Of course... the easy and obvious way works.

Thank you so much!
Post Reply

Return to “CMSMS Core”