Re: More efficient fetch?
| From: | Monte Ohrt | Date: | Tue, 22 Jan 2002 15:23:56 +0000 |
| Subject: | Re: More efficient fetch? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2567@lists.php.net to get a copy of this message | ||
You can register a custom template handler to do your work.
{include file="cache_me:index.tpl"}
And "cache_me" would be a function that retains template content in
memory for subsequent calls.
Peter Bowyer wrote:
>
> At 08:20 AM 1/22/02 -0600, Andrei Zmievski wrote:
> >On Sat, 19 Jan 2002, Peter Bowyer wrote:
> > > Hi,
> > >
> > > I think there may be a need for a Smarty function that will fetch the
> > > template the first time, and then reference it as a string for the next
> > 'n'
> > > requests for the template, where n is an integer.
> >
> >Go ahead and write a custom function then - that's the power of Smarty.
> >:)
>
> I don't think it can be done as a custom function, as it affects the way
> the compiler works. Or are custom functions more powerful than I thought?
>
> Peter.
>
> --oOo--
> Narrow Gauge on the web - photos, directory and forums!
> http://www.narrow-gauge.co.uk
> --oOo--
> Peter's web page - Scottish narrow gauge in 009
> http://members.aol.com/reywob/
> --oOo--
>
> ---
> 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/