What is the best way to include a page header and footer within zf whilst using MVC?
At the moment I have this in my bootstrap:
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
static public function displayHeader(){
return 'pageheader';
}
}
and then within a controller I can do something like:
$this->view->header = Bootstrap::displayHeader();
Is there a better way to do this? Could I perhaps combine it with render() and use the displayHeader to generate all the required variables then use render() to load the header.phtml file?
Any insight would be great!
You put that into your layout.phtml