I'm new to the Zend Framework, and I'm trying to figure out how they want to display things. I am creating a website and I have a menu that is dynamically created from the database. If I invoke the correct action, I see how menu.phtml looks right.
Now I would like this menu.phtml file to appear on every page, and I don't know how to do it. I read about placeholders, helpers ... but didn't seem to understand.
I assume that I need to call an action to create menu.phtml, make it and place it in placeholder, I can call from my layout.phtml, but I canβt see how I do it.
Thanks in advance.
DECISION:
In layout.phtml, I added the following line:
<?php echo $this->action('menu', 'page', null, array());?>
This will access the menuAction in the PageController and start it. The variables will be populated, the required code will be executed before displaying the menu.phtml script view.
hhoud source share