How can i change application layout in runtime?
thanks
How can i change application layout in runtime?
thanks
Just set your controller’s layout property to the value you want:
public function actionIndex() {
$this->layout = '//layouts/custom';
$this->render('index');
}
Notice that you can also do it from the view.
Sometimes it’s even more convenient.