title: Yii module layout
body: <p>I am trying to get work layout in a module. So I created a layout in view folder of module called <a href="http://screencloud.net/v/CwwL" rel="nofollow">'adminLayout'</a> </p>
  
  <p>Assuming a layout in <code>AdminModule.php</code> in init() method.
  So now it looks like this:</p>
  
  <pre><code>public function init()
  {
  
      $this-&gt;layoutPath = Yii::getPathOfAlias('application.modules.admin.views.layouts');
      $this-&gt;layout = 'adminLayout';
      // this method is called when the module is being created
      // you may place code here to customize the module or the application
  
      // import the module-level models and components
      $this-&gt;setImport(array(
          'admin.models.*',
          'admin.components.*',
      ));
  
  
  }
  </code></pre>
  
  <p>But for some reason layout didn't apply to module. I tried to add "public $layout" to controller and it works.</p>
  
  <p>Can't figure out what problem is.</p>
  
  <p>Also I tried to add layout settings to <code>main.php</code> in config folder, but still no action. Will be grateful if someone could help.</p>