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

Variable modifers inside functions?

 
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
gjeffrey
Smarty n00b


Joined: 09 Jun 2003
Posts: 3

PostPosted: Mon Jun 09, 2003 2:49 am    Post subject: Variable modifers inside functions? Reply with quote

I think that what I am trying to accomplish can be best explained with a code sample. I know it's wrong, but I want to figure out how to make the idea work:

{fetch file="http://url.com/search?q=`$smarty.get.q|escape: "url"`"}

Anyway, I think that basically explains the thought behind what I'm asking...
Back to top
View user's profile Send private message AIM Address
mohrt
Administrator


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

PostPosted: Mon Jun 09, 2003 4:03 am    Post subject: Reply with quote

I'll recommend to do this fetching work in PHP and assign it, your template should deal with presentation and not business logic.

That said, you accomplish what you want with two steps:

{assign var="q_esc" value=$smarty.get.q|escape:"url"}
{fetch file="http://url.com/search?q=$q_esc"}

Monte
Back to top
View user's profile Send private message Visit poster's website
gjeffrey
Smarty n00b


Joined: 09 Jun 2003
Posts: 3

PostPosted: Mon Jun 09, 2003 4:03 pm    Post subject: Reply with quote

Thanks for two pieces of useful information.
Back to top
View user's profile Send private message AIM Address
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