Tcalp
(Tcalp)
February 18, 2012, 7:21am
1
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
I would much prefer to have layouts a sub-directory of the <themename> instead of inside the views folder.
Any help is much appreciated.
mbi
(mbi)
February 18, 2012, 10:27am
2
Tcalp
(Tcalp)
February 18, 2012, 3:25pm
3
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.
andy_s
(Arekandrei)
February 18, 2012, 4:28pm
4
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.