|
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 |
compuboy1010 Smarty Rookie
Joined: 20 Aug 2003 Posts: 10
|
Posted: Thu Aug 28, 2003 9:56 am Post subject: Including a template into as tremplate ? |
|
|
Hi,
I want to include a template into a template more than once.
The problem that I have is, that the included file (menutable) has the same variables for every inclusion.
When I assign variables to the table options, all tables look the same. I understand the problem myself but don't know how to solve it.
Please could anybody help?
Thank you very much. |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Thu Aug 28, 2003 2:06 pm Post subject: |
|
|
you can pass variables to templates when including them:
[index.tpl]
{include file="foo.tpl" name="name1"}
{include file="foo.tpl" name="name2"}
[foo.tpl]
name is {$name}
should print:
name is name1
name is name2
you can pass any variable that way, only the variablenames "file" and "assign" have special meaning to to {include} and cannot be passed.
HTH
messju |
|
Back to top |
|
compuboy1010 Smarty Rookie
Joined: 20 Aug 2003 Posts: 10
|
Posted: Fri Aug 29, 2003 7:55 am Post subject: Thank you very much. Vielen Dank |
|
|
Thank you very much.
Hat mir sehr geholfen.
Gruss aus Dortmund |
|
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
|