Re: [PHP Template] Includes in templates

From: Date: Thu, 30 Mar 2000 15:08:09 +0000
Subject: Re: [PHP Template] Includes in templates
References: 1 2 3  Groups: php.template 
Request: Send a blank email to php-template+get-494@lists.php.net to get a copy of this message
On Thu, 30 Mar 2000, Peter Andreasen wrote: > No, because it is might not be dynamic data. Let's say I throughout my > site use the following whenever I need a nicelooking headline: > > <table width="100%" border=1 bgcolor="black" cellpadding=4> > <tr><td> > <font color=white size=2> > > This is a headline > > </font> > </td></tr> > </table> > > While I could just type in the whole thing every time, it would be so > much easier for me to just write > > { include niceheadline.tpl ('headline' => 'This is a headline') } > > instead. Optimally I could even write > > { include niceheadline.tpl ('headline' => '{$dynamic_headline}') } > > _if_ my headlines came from some logic (in php). > > Does it makes sense? Yes, I understand what you are saying. I suppose there could be cases where a designer would want to have some variables used in included templates that don't come from the script. Something like this could be added to the template engine spec. However, we need to think long and hard about exactly how far we want to take the template engine. We definitely don't want it to turn into another scripting language, do we? -Andrei * Why is it always Segmentation's fault? *

« previous php.template (#494) next »