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… ?
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.