Speaking of Smarty! Definitely check out
http://www.phpsavant.com/,
really light weight plus its templates are written in PHP. So you don't
have to learn a markup language that is parsed and then compiled back
into PHP. Savant is coming from kind of a different mind set than the
Smarty project aims to implement.
I haven't looked into the code of Savant2, which is for PHP4. But the
code in Savant3, for PHP5, is very clean from what I have seen so far.
Extremely powerful OO API while being easy to follow and extend.
The
http://www.phpsavant.com/ site does a good job of documenting the
API and explaining the philosophy behind Savant. There are no real docs
for Savant3 right now, but between all the examples for Savant2 and
reading through the code you can make your way pretty easily.
Happy Templating!
Dan Johansson wrote:
Two ways this can be done:
Output buffering, which you are already using.
Template system that calls the template after the program logic. Like smarty.