Move layouts folder (outside of views) ?

Hey everyone,

I was wondering if there is an easy way to tell Yii a different default pathing for page layouts.

Currently it is setup as :

themes

  • <themename>

  • views

    • layouts

I would much prefer to have layouts a sub-directory of the <themename> instead of inside the views folder.

Any help is much appreciated.

http://www.yiiframework.com/doc/api/1.1/CWebApplication#layoutPath-detail

That isn’t what I’m looking for (I’m fairly certain anyhow). From what I understand of Yii

protected/views/layouts acts as a ‘fall-back’ entry which I don’t want to change

also, regardless of weather I’m in…

/themes/1/layouts

/themes/2/layouts

etc…

I would like to be able to state $this->layout = ‘x’; in the controller.

I think you have to override CController.getLayoutFile() or CTheme.getLayoutFile() method, but I don’t see a reason to do that, because layout is a view and should be placed under the “views” directory.