I'm trying to get a completely different layout to render in a popup and can't seem to get the layout to render.
I've got a windowcontroller that it's supposed to talk to the app through and can get it to render an index file i put under views/window/index.php. But when i set the layout through either $this->layout or Yii:app()->layout it doesn't render the layout file under views/layout.
The only thing that is rendered into the window is the contents of the index file.
can someone tell me what I'm missing. I've read the multi layout cookbook and it hasn't helped since it uses the main layout as the parent and I'm looking to separate the window stuff to it's own parent.
<?php
class WindowController extends LangController
{
public function init()
{
// we don't need a layout
Yii::app()->layout = 'protected/views/layouts/user.php';
// the actions will overide the controller layout
}
public function actionIndex()
{
Yii::app()->layout = 'protected/views/layouts/user.php';
$this->render('index');
//$this->redirect(Yii::app()->homeUrl);
}
};
?>
I get the contents of index but i don't get the contents of user.php.
I've also just tried user.php for the location but it didn't work either.