I'm new to the Zend Framework and I'm trying to get how they want to render things. I'm creating a website and I have a menu which is dynamically created from the database. If I call the correct action I see the menu.phtml view correctly.
Now I'd like for this menu.phtml to be rendered on every page and I have no clue of how to do this. I read about placeholders, helpers, ... but don't seem to get it.
I suppose I have to call the action to generate the menu.phtml, render it and put it in a placeholder I can call from my layout.phtml but I don't see how I do this.
Thanks in advance.
SOLUTION:
In the layout.phtml I added the following line:
<?php echo $this->action('menu',
'page',
null,
array());?>
This will access the menuAction in the PageController and run it. The variables will be filled in, the needed code will be executed before rendering the menu.phtml view script right there.
Welcome!
render('page/menu.phtml'); ?>