Announce by phprf on 2/02/15:
As of Drupal 8, PHPTAL will not be needed. Twig does everything that PHPTAL did and more.
Announce by phprf on 2/21/12:
D7 release is now up!
Manifest by phprf:
Welcome to the best template engine on drupal.org! Ok...well, best in my opinion! Take a look below to see what I mean.
You'll need an installation of PHPTAL as a PEAR module or the latest zip file (http://phptal.org/download.html).
You can get the pear module by saying
pear install http://phptal.org/latest.tar.gz
and upgrade by saying
pear upgrade http://phptal.org/latest.tar.gz
on the command line.
I have done a from scratch rewrite of the engine! Hopefully, this will help the many people who have long desired a good port of PHPTAL to Drupal 6!
Many thanks to Olav for his work on the Drupal 5 version which served as a
study help for me! I have included some of his comments below...
I believe that this engine provides the same advantage of a combined push/pull approach for dynamic content as PHPtemplate but at the same time the template files are clean and pure XHTML. PHPTAL templates can thus be edited with most standard WYSIWYG HTML editors and are guaranteed to output valid XHTML.
As of this moment there are no PHPTAL themes ported to Drupal, but work is being done to port Garland to PHPTAL, hopefully providing a base on which Drupal users can write/customize their own themes! The current version of this work can be supplied upon request.
For the moment, to give you an example of what PHPTAL can do, compare this code for the PHPtemplate engine:
<?php if (is_array($secondary_links)) : ?> <ul id="secondary"> <?php foreach ($secondary_links as $link): ?> <li><?php print $link?></li> <?php endforeach; ?> </ul> <?php endif; ?>
with the corresponding block for PHPTAL:
<ul tal:condition="php:is_array(secondary_links)" id="secondary"> <li tal:repeat="link secondary_links" tal:content="link">secondary link</li> </ul>
This engine was developed using PHPTAL 1.2.2.
SPECIAL THANKS :
Laurent Bedubourg for his implementation of PHPTAL.
Olav Schettler for providing us with the Drupal 5 version of this theme engine.
- Maintenance status: Actively maintained
- Development status: Under active development
- Downloads: 9,131
- Last modified: February 2, 2015
- Stable releases are covered by the security advisory policy.
Look for the shield icon below.