title: Zend Layout render some parts on every page
body: <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Thanks in advance.</p>
  
  <p>SOLUTION:</p>
  
  <p>In the layout.phtml I added the following line:</p>
  
  <pre><code>&lt;?php echo $this-&gt;action('menu',
                              'page',
                              null,
                              array());?&gt;
  </code></pre>
  
  <p>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.</p>