Re: Template pool class
| From: | Anders Janson | Date: | Tue, 20 Nov 2001 09:57:41 +0000 |
| Subject: | Re: Template pool class | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-1986@lists.php.net to get a copy of this message | ||
Ivo Jansch wrote:
> Hello,
>
> Anders Janson wrote:
>
> > master layout template, and some more or less modular content.
> > In my case, even the level of nesting is unknown. All modules use one
> > or more templates. On top of that, every module may use submodules and
> > so on....
>
> Ah. Our system is similar. But I still use just one smarty object. When
> rendering a subtemplate, I save smarty's state, and when the subtemplate
> is finished, I reset it to it's original state.
>
> Currently, I only do this with the _tpl_vars members.
Hmm... interesting approach!
>
>
> I'm sure it's tricky and maybe there are other members that indicate a
> state, but for now it works, and quite fast :)
Sounds like a somewhat "dirty" trick ;-)
You are not supposed to mess around with internal variables LOL :)
But if it works for you - great!
/Anders