Multiple Main Layout, possible?

Hello all. I am still learning Yii framework and there is something I wanna ask. If I want to create a back-end website that have a different main layout with the front-end one, what should I do?

Must I create a new project as the back-end site. Or are there any way to select certain "main layout" for certain view… ?

Thanks before…:)

Check the $layout attribute in the controller class. You can set a different layout for the admin’s Controllers and another one in the user’s controllers

ah yes… But doesn’t those only change the column layout? Meaning the content will put in to , say, views/layouts/column1.php but in the end it will also in the views/layouts/main.php. Because the front-end has already used the current views/layouts/main.php, I want to create something like main.php for the back-end, a template that different with the front-end one. :)

Add backend.php and set layout to backend

Ahh…you’re right, Mech…

thank you very much :)

And I’d just noticed how the file of column1.php become attached in main.php. its because of

<?php $this->beginContent(‘application.views.layouts.main’); ?>

ahh… stupid me ~.~"

I think that this cookbook will help you

http://www.yiiframework.com/doc/cookbook/33/

I’ve been using this technique since I started with Yii and it brought me many advantages

You could also take a look at themes

:)

regards!

Ah… I see. Thank you for providing this.

Never found this cookbook. :)