Re: [SMARTY] Cache and insert second time..

From: Date: Wed, 05 Feb 2003 19:38:53 +0000
Subject: Re: [SMARTY] Cache and insert second time..
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7529@lists.php.net to get a copy of this message
We've gone that approach before, something like this: {insert name="get_banner" template="banner.tpl"} Then the insert function does its db query then does: return $this->fetch('banner.tpl'); ... displaying the results. This way the insert content is still maintained in a template. Monte On Wed, 2003-02-05 at 12:45, Nino Katic wrote: > Hi, > > I didn't get the right answer last time I asked this, so maybe this time > I'll be luckier :-) > So, my question is this: If I use insert with the function that access db > and gets some data from it am I supposed to define my html layout in that > function? For example, if db query returns 10 columns which I store in > arrays and then i use it on different positions on my page I'm not able to > define layout in smarty template because it has been cached? The only part > that was not cached is that insert function, so I suppose I should define > html layout in it. Is this right? > > Nino -- Monte Ohrt <monte@ispi.net>

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