I try to develop my own little framework. For this, I\'d like to read up some templating techniques. I know that templating is a really complex topic, but knowing some strat
I really enjoyed zend-framework approach to this, and have used it myself in our framework. You will have a view class with will have things like:
$view = new View();
$view->setTemplatesPath('.....');
$view->assign('name','value');
$view->render('index');
the render method will take all the variables stored and make them properties and include the template based on the Path set, so in your templates you will have:
foo; ?>
....
load('header'); // this includes another template ?>