Joomla has already provided layout with great overriding option. But I feel one issue with layout-overriding. When I put custom base-path then it would not be overridden. So I want to override JLayoutFile class in my extension and change sequence of path priority.
Following path priority followed
1. templates/mytemplate/html/layouts/com_mycomponent
2. components/com_mycomponent/layouts
3. templates/mytemplate/html/layouts
4. base_path (custom path set by me)
5. layouts
I need feedback from Joomla-developers.
@phproberto @Bakual @mbabker
Labels |
Added:
?
|
@mManishTrivedi @illovo There is #3231 which also has some proposal for that. May I suggest to move your comments there? That PR is still WIP, so your proposals can be incorporated there...
Don't make the whole thing to complex.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-05-08 22:25:03 |
Closed_By | ⇒ | zero-24 |
What do you think about an additional option for class JLayoutFile. Something like
$options = array('basePathOverridable' => 1);
Depending on this option refreshIncludePaths() could sort $this->basePath with a lower priority.
Why? I use some layouts that expect current bahavior. Overrides would be a bad idea concerning updates. For other layouts it would be perfect to give users the opportunity to use overrides. Thus I could work with two custom layout folders, one overridable, the other one not, or similiar.