Re: nested templates (sic)

From: Date: Fri, 21 Dec 2001 00:08:21 +0000
Subject: Re: nested templates (sic)
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2351@lists.php.net to get a copy of this message
You just have to have an escape route. blah.tpl: {if $Table} {include file="blah.tpl"} {else} No more tables! {/if} ----- Original Message ----- From: "Francois Dumais" <f_dumais@videotron.ca> To: smarty@lists.ispi.net Date: 12/20/01 6:59:39 PM > >Thanks for your promptitude, your answer relaxed me. > >Is this to mean that reusable templates are not an option when you run the >risk of calling a template that embeds at any level further this very >template? > >Does the solution lie in the creation of reusable "instances" of tables >(renamed copies of the template) in order to attain ...generic... >embedment?? Or is there a better way to do this?? > > >----- Original Message ----- >From: "Monte Ohrt" <monte@ispi.net> >To: <smarty@lists.ispi.net> >Cc: <smarty@lists.ispi.net> >Sent: Thursday, December 20, 2001 3:22 PM >Subject: [smarty] Re: nested templates (sic) > > >> use include to recursively include templates within another. >> >> {include file="foo.tpl"} >> >> And obviously, you can get stuck in an infinite loop if a template >> includes itself. >> >> > Francois Dumais wrote: >> > >> > I am new to smarty. I would just like to know what is the basic >> > technique or mechanism needed in smarty to have embedded (or nested) >> > templates. Practically speaking I want to have html tables within >> > html tables. I have tried to include templates that include templates >> > that include templates, each template being basically built as an html >> > wrapper around the include call. But it doesn't work. Any hints >> > would be appreciated. Should we use "fetch", "capture", or >> > "sections"? >> > --- >> > You are currently subscribed to smarty as: monte@ispi.net >> > To unsubscribe send a blank email to >> > $subst('Email.Unsub') >> > Visit Smarty's homepage at >> > http://www.phpinsider.com/php/code/Smarty/ >> >> -- >> Monte Ohrt <monte@ispi.net> >> http://www.ispi.net/ >> >> --- >> You are currently subscribed to smarty as: f_dumais@videotron.ca >> To unsubscribe send a blank email to $subst('Email.Unsub') >> Visit Smarty's homepage at >> http://www.phpinsider.com/php/code/Smarty/ > > >--- >You are currently subscribed to smarty as: brian@massassi.net >To unsubscribe send a blank email to $subst('Email.Unsub') >Visit Smarty's homepage at >http://www.phpinsider.com/php/code/Smarty/

« previous php.smarty.general (#2351) next »