Setting the layout path

I’m busy implementing a website and I’m seperating the backend code from the front end, both sharing the same database. I followed the Yii Cookbook tutorial http://www.yiiframework.com/doc/cookbook/33/

Now my problem is I can’t get it to render the main.php backend layout file eg. /protected/backend/views/layouts/main.php. Instead it is still rendering the frontend layout file eg /protected/views/layouts/main.php

How can I change this? Is it possible? I followed the exact steps in the cookbook.

hello,

yes, it is possible, however unfortunately it’s a little buggy at the moment (see: http://code.google.com/p/yii/issues/detail?id=1043&colspec=ID%20Type%20Status%20Priority%20Milestone%20Owner%20Stars%20Summary )

It is #2 on the issues list so I’m pretty sure it will be fixed by the next release.

If you need the solution right away, you can find a quick fix at the link I posted above …

i hope it helps…

–iM

After reading that issue i think that the issue will only apply if one will use the CRUD to generate the application. If the OP did use the CRUD command then all he has to do is change the hard coded layout property in the Controller class.