Re: Re: an HTML_Template_IT[X] fork is available
| From: | Alexey Borzov | Date: | Tue, 11 Feb 2003 20:20:23 +0000 |
| Subject: | Re: Re: an HTML_Template_IT[X] fork is available | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13138@lists.php.net to get a copy of this message | ||
Christian Dickmann wrote:
You see, I use a different approach: one common file for all pages, containing header, footer and a placeholder. In every page this placeholder is replaced by a block with the current page's template via addBlockfile()Ugh, was this feature added when addBlockfile() was not working? Besides, what's the advantage of unconditional include instead ofkeeping itall inside one file?addBlockFile() is in PHP, I need a solution inside the template. Think of a CMS where you have footer and header. With this include I can have a header.inc.tpl.html and a footer.inc.tpl.html and the template is usable in PHP like one which has the complete page in it. Template designers are able to manage their templates with includes and they do not have to ask the PHP guy. I use this feature all the time and I do not get, why anyone would not want to use is ;-) Oh, now I've got it. :)
So your proposed package would break BC, which is bad for IT. I thought about this. It is quite easy to add <!-- INCLUDE -->, but thecaching will be broken: we don't know whether the included files changed until we load the main template... I can in fact do the same as with callbacks: either caching, or INCLUDE, not both.