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

include parameters

 
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 -> Bugs
View previous topic :: View next topic  
Author Message
taerendil
Smarty Rookie


Joined: 05 Mar 2004
Posts: 5
Location: France

PostPosted: Fri Mar 05, 2004 5:15 pm    Post subject: include parameters Reply with quote

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


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

PostPosted: Fri Mar 05, 2004 5:36 pm    Post subject: Reply with quote

Maybe you want to do this:

{include file="somefile.tpl" foo=$bar}

Then in the included file:

{$foo}
Back to top
View user's profile Send private message Visit poster's website
taerendil
Smarty Rookie


Joined: 05 Mar 2004
Posts: 5
Location: France

PostPosted: Fri Mar 05, 2004 5:59 pm    Post subject: Reply with quote

Hum Embarassed
I don't know why I tried such a thing...
Thanks !
_________________
Votre dévoué...
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 -> Bugs 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