Two-Step view in Zend Framework 1.0.0
Paulo Nei wrote an email to fw-general which is, I suspect a very common issue that people are going to run into:
I wanna put header & footer in all view templates.
But with ZF I don’t got an easy way to do it
At the moment, the Zend Framework doesn’t have an “officially blessed” solution, so there are multiple approaches being used:
1. Front Controller plug-in.
2. Zend_Layout proposal.
3. Zend_View Enhanced proposal.
4. Extend ViewRenderer directly.
The wiki is down again, so I could have got the links to 2 and 3 wrong!
At the moment, I’m using (4) as it’s simple. It does introduce problems if you want to use _forward() though, so if you are an _forward() person, then 1, 2 or 3 are better choices.
Update (04/Sep/2007): Also: http://www.spotsec.com/blogs/archive/the-basics-of-zend_layout-ahem-xend_layout.html