Re: Best PHP Template System

From: Date: Thu, 26 Apr 2012 08:48:00 +0000
Subject: Re: Best PHP Template System
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-317693@lists.php.net to get a copy of this message
On Thu, Apr 26, 2012 at 12:07 AM, Yared Hufkens <y423d@yahoo.de> wrote: > > Why use an external engine which slows your scripts down to do something > which can easily be done by PHP itself? PHP is imho the best template engine > for PHP. > With PHP 5.4, it became even easier because <?=$do->somestuff()?> can be > used without short_open_tag enabled. > However, you always schould divide UI and backend. > Hi, If you like to write an xml-template by having purely xml, you could also use OPT (Open Power Template). You can f.e. add a attribute to a tag by decision by writing this code: <div> <opt:attribute name="class" value="highlight" opt:if="$highlightDiv"/> Content </div> Feels a bit cleaner to me than writing <div <?php if ($highlightDiv) : ?>class="highlight"<?php endif; ?>> Content </div>

« previous php.general (#317693) next »