Smarty to javascript in Gallery

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
sturla69
Forum Members
Forum Members
Posts: 29
Joined: Fri Jan 19, 2007 9:24 am

Smarty to javascript in Gallery

Post by sturla69 »

Hi.

I'm trying to combine Gallery with Highslide, http://highslide.com/, or even more specific, this variant: http://www.roadrash.no/hs-support/modif ... ption.html. To do this effectively, I need to pass some variables from Gallery to a javascript, but I cannot find out how to do this.

Any tips out there?

I've managed to do the integration, but need it to be dynamic, hence the variable-passing to the javascript.
Jos
Support Guru
Support Guru
Posts: 4019
Joined: Wed Sep 05, 2007 8:03 pm
Location: The Netherlands

Re: Smarty to javascript in Gallery

Post by Jos »

You can put the javascript in the first template field, in stead of the javascript field. That way you can put smarty variables to the script.

Note that javascript sometimes uses { and } signs. Smarty relies on them too, therefore the javascript curlybrackets need to be escaped by {literal} {/literal} tags.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Smarty to javascript in Gallery

Post by applejack »

It's not that simple I remember it took me a long time to sort out.

See http://www.clivegrylls.com/photos/india ... cape/28-2/

PM me with further details if you haven't sorted it.
sturla69
Forum Members
Forum Members
Posts: 29
Joined: Fri Jan 19, 2007 9:24 am

Re: Smarty to javascript in Gallery

Post by sturla69 »

Thank you all, but I've managed to get it working.

Escaping javascript with {} worked great.
Post Reply

Return to “Modules/Add-Ons”