|
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 |
taerendil Smarty Rookie
Joined: 05 Mar 2004 Posts: 5 Location: France
|
Posted: Fri Mar 05, 2004 5:15 pm Post subject: include parameters |
|
|
I experienced some problems while trying to use a parameter in a included file.
The main file contains this line :
{include file="somefile.tpl" name="bar"}
the included file this one :
{ $$bar }
What I want to do is to print in the included file the var which name is in $bar (passed to the template during the include)... but it doesn't seem to work... _________________ Votre dévoué...
|
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Fri Mar 05, 2004 5:36 pm Post subject: |
|
|
Maybe you want to do this:
{include file="somefile.tpl" foo=$bar}
Then in the included file:
{$foo} |
|
Back to top |
|
taerendil Smarty Rookie
Joined: 05 Mar 2004 Posts: 5 Location: France
|
Posted: Fri Mar 05, 2004 5:59 pm Post subject: |
|
|
Hum
I don't know why I tried such a thing...
Thanks ! _________________ Votre dévoué...
|
|
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
|