Re: [PHP Template] DTML?

[email protected] (Teodor Cimpoesu) Fri, 18 Feb 2000 15:47:14 +0200
Newsgroups php.template
Organization DIGICOM S.A. Romania
Message-ID <[email protected]>
Anne wrote:
> 
> Monte Ohrt wrote:
> >
> > Yes it is redundant, but it could possibly be handy. An example that
> > we've ran into, The designer would like a way to quickly throw the
> > current date into the template. To do this, the developer would have to
> > make the date available in a variable first, then the designer can use
> > it. OR, they could do a quick PHP parse:
> >
> > {:php}
> >         echo date();
> > {:/php}
> >
> > On the other hand, we could always be extending functionality of the
> > template engine. Maybe there could be this type of tag:
> >
> > {:date "now"}
> >
> > Another idea, we can have a config file that maps template markup to php
> > commands, so the extendability of the template tags is very flexible.
> 
> I like the above idea.
> 
> There is nothing more frustrating for a designer than to have to go back
> and forth with the coder just to get couple words to display on the
> screen in a particular format that depends on a condition where a
> varible is assigned a specific value.
> 
> I like having the flexibility of using if statements to format dynamic
> content. But it sounds like that breaks the rules for the ideal
> template. Right?
But how about a flexible way to define new tags (least in DTML you can
do that).
This way you can ``customize'' your template tags with handy tags for
your need.
The idea with the mapping may be good but I think it's silver bullet,
cause you
will loose performance (lookup+eval()ing).

-- 
CIMPOESU Teodor, Web Programmer
 @ DIGICOM S.A. Bucharest, Romania
 @ Internet, site development
 @ see http://internet.digiro.net/