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.
I have some ideas on how to fix this issue, but it'd probably at least clutter up the interface and might have different kinds of tradeoffs, so I'm not able to predict if I'll come up with a nice solution soon.
If you have a nice idea on how to implement PHP Template Inheritance in spirit, please drop me a mail at daniel@dornhardt.com.
It has been interesting to set this place up, so thanks everybody for coming bye - and thanks for all the fish. :)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
I have some ideas on how to fix this issue, but it'd probably at least clutter up the interface and might have different kinds of tradeoffs, so I'm not able to predict if I'll come up with a nice solution soon.
If you have a nice idea on how to implement PHP Template Inheritance in spirit, please drop me a mail at daniel@dornhardt.com.
It has been interesting to set this place up, so thanks everybody for coming bye - and thanks for all the fish. :)