Re: [PHP Template] Revised proposal
| From: | Andrei Zmievski | Date: | Fri, 18 Feb 2000 22:32:21 +0000 |
| Subject: | Re: [PHP Template] Revised proposal | ||
| References: | 1 2 3 4 5 6 | Groups: | php.template |
| Request: | Send a blank email to php-template+get-180@lists.php.net to get a copy of this message | ||
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. *