Another Layout Question

What is the best way to setup the home page using the column2 layout and all of the other pages set to use the column1 layout?

if your site need different layouts , you need design these different layouts ! feel free to use different layouts config in your controller and its action !

you can modify your gii to generate the controller to use “column1” layout (for this topic pls search it ) :lol:

Just call you layout in the controller action , which layout you wants, or a new layout


public function actionIndex()

{

$this->layout='//layouts/column2';

$this->render('pages/about');

}

And then, leave the other actions intact - they’ll inherit the default layout.

Thanks!