Re: [PHP Template] DTML?

From: Date: Thu, 17 Feb 2000 23:57:14 +0000
Subject: Re: [PHP Template] DTML?
References: 1 2 3 4 5 6  Groups: php.template 
Request: Send a blank email to php-template+get-135@lists.php.net to get a copy of this message
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? -- Anne Holz | anne@ispi.net art director | ispi | voice: +1.402.441.3295 http://www.ispi.net | fax: +1.402.483.5418> > > Monte > > Darrell Brogdon wrote: > > > > I agree. It seems like all of this other stuff is redundant to what PHP > > already does. Just thinking from my perspective, it would be nice to be > > able to let our designer build a web page and just include a few simple tags > > that brings in all the back-end development our developers have done. > > > > If I've missed something here please feel free to clue me in. :) > > > > -D > > > > ----- Original Message ----- > > From: Dan Libby <danda@epinions-inc.com> > > To: <monte@ispi.net> > > Cc: <php-template@lists.php.net> > > Sent: Thursday, February 17, 2000 5:02 PM > > Subject: Re: [PHP Template] DTML? > > > > > What's the point of this? The whole theory behind using templates is > > separation > > > of display (HTML) from code. If you want to mix the two, you may as well > > use > > > standard PHP which allows just that, eg: > > > > > > <P>My name is <?php echo $myname; ?>.</P> > > > > > > If our template system allows arbitrary mixing of code and display, then > > it has, > > > in my opinion, lost its reason for existing. > > > > > > -dan > > > > > > > > > > > Our SmartTemplate design does just that, we can imbed php code: > > > > > > > > {php:} > > > > <? echo "foo"; ?> > > > > {/php} > > > > > > > > We could put this ability into the template engine. > > >

« previous php.template (#135) next »