title: ZF1 render a module view into common layout
body: <p>I'm actually trying to create a module in ZF1 which I want to be really "plugin"-like. The main application use the default layout which is located under <code>data/current/views/layouts</code>. </p>
  
  <p>First problem, my module, use by default the following layout <code>application/views/layouts/default.phtml</code>. What I want is to use the other one (see above). So I did this : </p>
  
  <pre><code>public function init() {
      parent::init();
      $layout = Zend_Layout::getMvcInstance();
      $layout-&gt;setLayoutPath(DATA_PATH . '/view/layouts');
      $layout-&gt;setLayout('common');
  }
  </code></pre>
  
  <p>The second problem is that, in this layout (<code>data/current/views/layouts</code>), I'm actually rendering some partial views. But when I try to set the layout from the module, I got an error because it can't find those partials (because of the context, it's now trying to load those partial from the module context). I don't want to copy those partials into my module in order to make it works (dirty and not scalable). So the question is : how to just render a module action (controller/action) into the common layout but without any partials errors?</p>
  
  <p>Thanks to all for your help</p>