Unfortunately I found a bug which is not fixable within the current design.
The problem I noticed is that outside the first include()d template, the local variables of the including script are lost.
It's still possible to use $GLOBALS or some other mechanism (Eg. Singleton Pattern) to access variables in the base or intermediate templates, but the simple elegance I was shooting for just isn't there right now. ... read more
First Release of PHP Template Inheritance, a free little templating Hack
"PHP Template Inheritance" consists of a handful of functions which allow child templates
to inherit common structure from base templates. Multiple levels of inheritance
are possible.
The inspiration for this project was Django's template inheritance mechanism: http://docs.djangoproject.com/en/dev/topics/templates/#template-inheritance... read more