|
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 |
gjeffrey Smarty n00b
Joined: 09 Jun 2003 Posts: 3
|
Posted: Mon Jun 09, 2003 2:49 am Post subject: Variable modifers inside functions? |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Mon Jun 09, 2003 4:03 am Post subject: |
|
|
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 |
|
gjeffrey Smarty n00b
Joined: 09 Jun 2003 Posts: 3
|
Posted: Mon Jun 09, 2003 4:03 pm Post subject: |
|
|
Thanks for two pieces of useful information. |
|
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
|