H2O PHP TEMPLATING ENGINE / LIKE DJANGO
Wow finally I found something that really makes me like PHP so much more. Recently I have been trying to do every new project I start in Google App Engine. Simply I love the Django templates that allows me to quickly build up the project in a tiny amount of code.
After a quick search I found H20 templating system which is port of the Django system.
http://github.com/speedmax/h2o-php/tree/master
The documentation is quick and excellent, setup is simple.
To get started code is simple as this.
*in your template*
{{ person.name }}
*in php*
$person =array(
‘name’ => ‘Peter Jackson’, ‘age’ => 25
);
$h2o->render(compact(‘person’));
?>
OK, so that was easy. But you can also get your template to inherit your layout or base template which means it will automatically write into pre-defined areas of this template.
Since using this, it has turned 2-3 pages of pretty messy code down to 3-4 pages of super tiny simple code that is extensible.