Includes in templates
| From: | Peter Andreasen | Date: | Tue, 28 Mar 2000 21:21:25 +0000 |
| Subject: | Includes in templates | ||
| Groups: | php.template | ||
| Request: | Send a blank email to php-template+get-491@lists.php.net to get a copy of this message | ||
Hi,
I only recently subscribed to this list, so my apologies if this has
already been discussed. As a lot of people I have played with various
forms of template solutions for php. I have often wished I could do the
following in a template (pseudo template syntax follows):
<h2>Example news page<h2>
{subtemplate niceheader.tpl ('headline' => 'Business news')}
<hr>
{subtemplate niceheader.tpl ('headline' => 'World news')}
where niceheader.tpl is a template which contains '{$headline}'
somewhere.
That is, when in 'designer-mode' I want to use the template concept but
without need to switch to 'coder-mode'...
From the specs I would say something like the above is not possible with
the proposed template system. You would have to either write out the
HTML twice or actually write php-code to deal with the template
niceheader.tpl.
Hmm. I am not sure this explanation is clear. Do you people see what I
mean?
- peter
--
ln -s /dev/random ~/.plan