Includes in templates

[email protected] (Peter Andreasen) Tue, 28 Mar 2000 23:21:25 +0200
Newsgroups php.template
Message-ID <[email protected]>
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