Re: [PHP Template] Revised proposal
[email protected] (Andrei Zmievski) Fri, 18 Feb 2000 16:32:21 -0600
| Newsgroups | php.template |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 18 Feb 2000, Dan Libby wrote:
> One could argue that this belongs at the application level, above the
> templating system. In fact, I've done something kind of similar here as a
> testcase. Basically, I wrappered tmpl_include() with a cobrand_include() and
> then it includes the correct template for a given cobrand based on hostname.
>
> Still, the ability to use multiple templates with the same piece of code is an
> attractive feature and I believe we should think about how to generalize it if
> possible.
Yes. The vague outline I see in my head is something like this:
- Have another tag called {{processor ..}} which specifies the php
script.
- Inside that PHP script should be function called process_template() or
something similar.
- The engine will load the template and then check to see if there are
any processor tags and store them in the list.
- At tpl_fetch()/tpl_print() time the engine will go through each
processor and call process_template()
- process_template() will do assign/show/hide/whatever
-Andrei
* Ethernet n.: something used to catch the etherbunny. *