Multiple Default Layout?

Basically, in Yii there is main.php that will render the main layout structure including header, sidebar, mainmenu, content section and footer. Other layouts called column1 or 2 just contain the view of content section in the main layout. But now Im bored with this main.php and would like to use another one. I create main1.php that put it in the layouts folder, so how can I set it as default layout or how can I use it as main layout? Can I use both main.php and main1.php?

Take a look at column1.php or column2.php. These templates calls main.php:




<?php /* @var $this Controller */ ?>

<?php $this->beginContent('//layouts/main'); ?>

...

<?php $this->endContent(); ?>



So take your myNewMain.php. Create your own myNewColumn1.php with:




<?php /* @var $this Controller */ ?>

<?php $this->beginContent('//layouts/myNewMain'); ?>

...

<?php $this->endContent(); ?>



and in your controller set as default layout myNewColumn1.

Thanks alot, it work correctly :).