Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
Call same template several times

 
Post new topic   Reply to topic    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Chico3001
Smarty Rookie


Joined: 05 May 2011
Posts: 5
Location: Somewhere in Mexico, D.F.

PostPosted: Tue Feb 21, 2012 6:17 pm    Post subject: Call same template several times Reply with quote

Hi, i made a generic table layout to use on my webpage, but now i need to show 2 of this layouts on the same page

Is there a way to call the same template twice and find wich variable belongs to wich? or the only way is to copy the template file with another name and include it along with the first one?
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4173
Location: Hamburg / Germany

PostPosted: Thu Feb 23, 2012 7:28 pm    Post subject: Reply with quote

You can include the subtemplate twice and pass diffrent values on each call.

see http://www.smarty.net/docs/en/language.function.include.tpl example 7.47
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    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