RE: [PEAR-DEV] Template class

From: Date: Tue, 11 Dec 2001 08:03:59 +0000
Subject: RE: [PEAR-DEV] Template class
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3434@lists.php.net to get a copy of this message
Well i never understood putting any logic inside the templates All the templates should do is use placeholders and blocks ... Anything beyond that is putting logic where it does not belong and you are limiting yourself to designers that can also code my 2 cents, Lukas Smith smith@dybnet.de _______________________________ DybNet Internet Solutions GbR Alt Moabit 89 10559 Berlin Germany Tel. : +49 30 83 22 50 00 Fax : +49 30 83 22 50 07 www.dybnet.biz info@dybnet.biz _______________________________ > -----Original Message----- > From: LIMBOURG Arnaud [mailto:arnaud.limbourg@cegetel.fr] > Sent: Tuesday, December 11, 2001 8:59 AM > To: list > Subject: RE: [PEAR-DEV] Template class > > The point of templates of to separate logic from layout, if your designers > have to learn php to make tempaltes, it's useless. > > > On Mon, 10 Dec 2001, Wolfram Kriesing wrote: > > > > > (just in case any of the people on PEAR-DEV will read this at all, > > > since everyone must be tired of the template class debates :-) ) > > > > > > i just wanted to say what i had to write, because i didnt see any of > > > the existing template classes/engines provide me with that > > > > > > the main features are: > > > # compiling template class which (almost) only replaces '{' by <?php > > > and '}' by ?>, with pre and post filters > > > # uses indention to create the '{' and '}' for php-code inside > > > the > > > template, so clean code is a requirement and no closing tags like: > > > {/if} are needed > > > # leaves all the power of php to you, not only the functionality the > > > template engine implements > > > # nothing to learn, just use '{' and '}' instead of the php-tags in > > > your template and indent your code properly > > > # the seperation of source and representation is all up to the > > > programmer (either this is good or bad) > > > # provides some default filter > > > > > > > > > a possible template > > > ----------------------------- > > > {if(sizeof($disadvantages))} > > > {foreach($disadvantages as $aDisadvantage)} > > > <li>{$aDisadvantage}</li> > > > {else} > > > no disadvantages registered yet :-) > > > ----------------------------- > > > > > > the compiled code is nothing more than this > > > ----------------------------- > > > <?php if(sizeof($disadvantages)) { ?> > > > <?php foreach($disadvantages as $aDisadvantage) { ?> > > > <li><?=$aDisadvantage?></li> > > > <?php } } else { ?> > > > no disadvantages registered yet :-) > > > <?php } ?> > > > ----------------------------- > > > so you can see - easy to use, nothing to learn and should > > be fast :-) > > > > > > feel free to have a look at > > > http://wolfram.kriesing.de/programming/ > > > > > > > > > > > > PS: BTW what was the decision on a multiple classes in PEAR > > > which do the same thing? > > > > > > -- > > > Wolfram > > > > > > > > > > > > -- > > PEAR Development Mailing List (http://pear.php.net/) > > To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net > > For additional commands, e-mail: pear-dev-help@lists.php.net > > To contact the list administrators, e-mail: > > php-list-admin@lists.php.net > > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, e-mail: pear-dev-unsubscribe@lists.php.net > For additional commands, e-mail: pear-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.pear.dev (#3434) next »