I would expect CController->layout to be passed to any render() command, but it seems this is not the case.
I have the following:
class ActionController extends Controller {
public $layout='column2';
...
public function actionView() {
$this->layout = 'column1'; // <-- this has no effect
...
$this->render( 'view', array(
'layout'=>'column1', // <-- this has no effect (this would actually create a $layout variable, but I was just trying my luck... <img src='http://www.yiiframework.com/forum/public/style_emoticons/default/wink.gif' class='bbc_emoticon' alt=';)' />
'model'=>$model,
) );
}
and in the view
<?php
$this->layout='column1'; // <-- [b]only this[/b] forces the layout to be changed
My expectation is that layout should be changeable by the CController - it is public after all!!