Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
You can put the code that changes the $layout field in your controller action:
public function actionIndex($mode)
{
if ($mode == 1)
$this->layout = "//layouts/column2";
else
$this->layout = "//layouts/column1";
$dataProvider=new CActiveDataProvider('Passport');
$this->render('index',array(
'dataProvider'=>$dataProvider,
));
If ($_GET['mode'] == 1 ) {
$this->layout='//layouts/column2';
} else {
$this->layout='//layouts/column1';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question