Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[Solved] Inline html_options

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
mistic100
Smarty n00b


Joined: 12 May 2011
Posts: 3

PostPosted: Thu May 12, 2011 4:13 pm    Post subject: [Solved] Inline html_options Reply with quote

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
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Thu May 12, 2011 5:02 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mistic100
Smarty n00b


Joined: 12 May 2011
Posts: 3

PostPosted: Thu May 12, 2011 5:10 pm    Post subject: Reply with quote

just discover the capture function, that's a cool function Laughing

thanks you
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP