| Issue 382: | Layout resolution should be better designed | |
| 5 people starred this issue and may be notified of changes. | Back to list |
Sign in to add a comment
|
We should introduce the concept of search path (or the so-called cascading search): 1. If a theme is used, the layout should be searched under the theme first. If not found, it should proceed to the next. 2. A list of search paths should be built in the following order: 1st-level parent module layout path, 2nd-level parent module layout path, ..., application layout path. 3. A view/layout name starting with a slash should always refer to the parent module's view path. More consideration is needed regarding the "default layout" concept used by the content decorator widget. |
||||||||||
,
Sep 29, 2009
(No comment was entered for this change.)
Labels: -Milestone-1.1a Milestone-1.1b
|
|||||||||||
,
Oct 15, 2009
I created something *similar* in my extension library's base controller class. It's a boolean called autoLayout. If enabled, the controller will look for a layout with the same name as the ID of the controller. If found, it will be set: // Find layout... if ( $this->m_bAutoLayout ) if ( file_exists(Yii::app()->getBasePath().'/views/layouts/'.$this->getId().'.php') ) $this->layout = $this->getId(); Full code attached. |
|||||||||||
,
Nov 01, 2009
(No comment was entered for this change.)
Labels: -Milestone-1.1b Milestone-1.1rc
|
|||||||||||
,
Dec 13, 2009
(No comment was entered for this change.)
Labels: Milestone-1.1.0
|
|||||||||||
|
|
|||||||||||