title: Zend Framework: Render multiple Views in one Layout
body: <p>I want to generate a dynamic site using Zend_Layout.</p>
  
  <p>My layout (/application/layouts/scripts/layout.phtml) contains the following lines:</p>
  
  <pre><code>...        
  &lt;body&gt;
  
          &lt;?php echo $this-&gt;render('header.phtml') ?&gt;
  
          &lt;div id="content"&gt;&lt;?php echo $this-&gt;layout()-&gt;content ?&gt;&lt;/div&gt;
  
          &lt;?php echo $this-&gt;render('footer.phtml') ?&gt;
  
      &lt;/body&gt;
  ...
  </code></pre>
  
  <p>If i browse to my index controller index action - Zend renders the index view (application/views/scripts/index/index.phtml) inside of $this->layout()->content automatically.</p>
  
  <p>Now i want to render the views of to different controller actions in the layout.
  So i generate a new controller auth with an action login that shows a login form.</p>
  
  <p>I change my layout to:</p>
  
  <pre><code>  ...        
      &lt;body&gt;
  
              &lt;?php echo $this-&gt;render('header.phtml') ?&gt;
  
              &lt;div id="content"&gt;&lt;?php echo $this-&gt;layout()-&gt;content ?&gt;&lt;/div&gt;
              &lt;div id="login"&gt;&lt;?php echo $this-&gt;layout()-&gt;login ?&gt;&lt;/div&gt;
  
              &lt;?php echo $this-&gt;render('footer.phtml') ?&gt;
  
          &lt;/body&gt;
      ...
  </code></pre>
  
  <p>When i browse to index/index, i want to define in this action that zend should render auth/login view inside $this->layout()->login and for example news/list inside of $this->layout()->content.</p>
  
  <p>index/index is than a kind of a page layout -
  and auth/login and news/list a kind of widget</p>
  
  <p>How to do this?</p>