Probably the easiest is to create a postDispatch plugin to compile the menu
and insert it into a Zend Layout placeholder.
Or render a custom page in your template which does the PHP and creates the
nav html.
<?= $this->render('footer.phtml') ?>
Most of the options are explained here in the manual:
http://framework.zend.com/manual/en/zend.layout.quickstart.html plugins are
here: http://framework.zend.com/manual/en/zend.controller.plugins.html
If you need more direct help just ask, but it's all pretty easy once you've
read through it.
Simon
Malfojan wrote:
>
> Hi,
>
> I've got a very simple page, header, left menu, right content, footer.
> Menu items are generated from the database.
>
> What is the easiest way of adding menu into the every page?
>
> I dont want to have this code in every controller's preDispatch() method:
> $menu = $menuGenerator->getMenu();
> $this->view->menu = $menu;
>
> Thanks for replies!
> Malfojan
>
-----
Simon Corless
http://www.ajb007.co.uk/
--
View this message in context:
http://www.nabble.com/Simple-menu-on-every-page-tp16121967s16154p16121994.html
Sent from the Zend Framework mailing list archive at Nabble.com.