Yii Framework Forum: Setting the layout path - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Setting the layout path Rate Topic: -----

#1 User is offline   YIINewBy 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 11-September 09
  • Location:Pretoria, South Africa

Posted 22 April 2010 - 01:36 PM

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.yiiframew...oc/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.
0

#2 User is offline   imehesz 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 699
  • Joined: 13-June 09
  • Location:Jacksonville, FL

Posted 22 April 2010 - 08:28 PM

View PostYIINewBy, on 22 April 2010 - 01:36 PM, said:

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.yiiframew...oc/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.c...Stars%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
It’s done, the great act of creation.
The maker rests. The wheel’s in motion.
-- Imre Madách

check out Yii Theme Factory at http://yii.themefactory.net
0

#3 User is offline   Vince. 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 432
  • Joined: 29-December 08
  • Location:Los Angeles,CA

Posted 23 April 2010 - 12:56 AM

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.
Vince Gabriel, Lead Developer.
Posted ImagePosted ImagePosted Image
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users