HTML Template Engines
Posted: Thu Jan 09, 2003 7:24 pm
Heya,
Currently working on updating my site (last news update was July last year!). I'm making sure the news, games, downloads and links are up to date.
I'm interested in templates at the moment however. Previous PHP efforts have had the php and html code mixed up together but I want to convert my code to use a template engine of some sort.
I have PHP and mySQL access on my webserver.. and if I whinge I *might* be able to get perl and python.
Does anybody have any experience with a decent template engine for php? Here's some engines I've played around with (or researched):
smarty:
cons: very convoluted.. requires C for cache
http://smarty.php.net/
phpLib:
pros: works alright
cons: have to undefine vars all the bloody time.
cons: can't have blocks on one line
cons: have to predefine dynamic blocks in php code
http://ontosys.com/php/templates.html
http://phplib.sourceforge.net/
http://www.sanisoft.com/phplib/
fastTemplate:
cons: uses separate files
http://www.phpbuilder.com/columns/sascha19990316.php3
templatePower:
pro: nested
con: have to predefine dynamic blocks
http://templatepower.codocad.com
ultratemplate:
pro: nested
cons: very wordy syntax
http://www.ultratemplate.com
- Nick
Currently working on updating my site (last news update was July last year!). I'm making sure the news, games, downloads and links are up to date.
I'm interested in templates at the moment however. Previous PHP efforts have had the php and html code mixed up together but I want to convert my code to use a template engine of some sort.
I have PHP and mySQL access on my webserver.. and if I whinge I *might* be able to get perl and python.
Does anybody have any experience with a decent template engine for php? Here's some engines I've played around with (or researched):
smarty:
cons: very convoluted.. requires C for cache
http://smarty.php.net/
phpLib:
pros: works alright
cons: have to undefine vars all the bloody time.
cons: can't have blocks on one line
cons: have to predefine dynamic blocks in php code
http://ontosys.com/php/templates.html
http://phplib.sourceforge.net/
http://www.sanisoft.com/phplib/
fastTemplate:
cons: uses separate files
http://www.phpbuilder.com/columns/sascha19990316.php3
templatePower:
pro: nested
con: have to predefine dynamic blocks
http://templatepower.codocad.com
ultratemplate:
pro: nested
cons: very wordy syntax
http://www.ultratemplate.com
- Nick