|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
mistic100 Smarty n00b
Joined: 12 May 2011 Posts: 3
|
Posted: Thu May 12, 2011 4:13 pm Post subject: [Solved] Inline html_options |
|
|
Hello,
I need to use {html_options} inside a javascript function, so the output should be inline or with quotes and '+' symbols (quite harder a think)
So how to preceed to have an inline output ? I've tried naively
{strip}{html_options options=$options.tags}{/strip}
but I didn't work...
Thanks,
Mistic.
Last edited by mistic100 on Thu May 12, 2011 5:11 pm; edited 1 time in total |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Thu May 12, 2011 5:02 pm Post subject: |
|
|
You need to have the output of html_options javascript-escaped? This might work:
Code: | {capture assign="opt"}{html_options ...}{/capture}
{$opt|escape:javascript} |
|
|
Back to top |
|
mistic100 Smarty n00b
Joined: 12 May 2011 Posts: 3
|
Posted: Thu May 12, 2011 5:10 pm Post subject: |
|
|
just discover the capture function, that's a cool function
thanks you |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|