?
avatar mManishTrivedi
mManishTrivedi
21 Nov 2014

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

avatar mManishTrivedi mManishTrivedi - open - 21 Nov 2014
avatar jissues-bot jissues-bot - change - 21 Nov 2014
Labels Added: ?
avatar illovo
illovo - comment - 21 Nov 2014

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.

avatar dgt41
dgt41 - comment - 21 Nov 2014

@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...

avatar Bakual
Bakual - comment - 21 Nov 2014

Don't make the whole thing to complex. :smile:

avatar zero-24
zero-24 - comment - 8 May 2015

Closing as we have a still open PR at #3231 Thanks.

avatar zero-24 zero-24 - change - 8 May 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-05-08 22:25:03
Closed_By zero-24
avatar zero-24 zero-24 - close - 8 May 2015

Add a Comment

Login with GitHub to post a comment