User tests: Successful: Unsuccessful:
At the moment, when you create a menu item, Joomla can detect views located both in components/com_mycom/views folder and components/com_mycom/view.
However, it only allows creating template override for views of a component has views located inside components/com_mycom/views folder only.
This small PR improves it so that we can create template override for views located both in views and view folder of a component.
Right now, in Joomla core, I only see that com_config has views located inside view folder of component.
Before this patch, you cannot create template override for com_config component.
After this patch, you will be able to create template override for com_config component.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Sorry I didnt read to the end where you said you can now create an overide for the config
I'm wondering why that folder is named view and not views in the first place
I have tested this item unsuccessfully on 4aaa583
Warning
JFolder: :folder: Path is not a folder. Path: /Applications/MAMP/htdocs/pg/components/com_config/view/cms/tmpl
JFolder: :files: Path is not a folder. Path: /Applications/MAMP/htdocs/pg/components/com_config/view/cms/tmpl
Message
Override created in /templates/protostar/html/com_config/cms
Successfully created the override.
This has to do with the "new" (but only used at one place and is supposed to die soon) MVC. Doesn't makes sense to implement something for this.
I suggest to close this PR
Unless com_config is to be rewritten in the "old" MVC then I can see the use case for being able to create override for com_config - J3 is going to be around for a minimum of 2 years.
Hi Brian
The config component (and some third party extensions) use this folder name (singular instead of plural) so that the controllers, models and views class can be autoloading. So we just register class prefix with Joomla (like this https://github.com/joomla/joomla-cms/blob/staging/components/com_config/config.php#L13) and the class can be called without having to use require or require_once to require the class directly. Infact, I think it helps us building extensions with better code (than using Joomla legacy MVC classes)
Thanks for your test. You tried a special folder (which has no layout insde it and it causes the error). Try modules, templates or config folder and it will work well. I can fix that issue so that only folder has tmpl inside will be displayed.
I can confirm it works for the three other subdirectories
On 19 December 2015 at 09:54, Tuan Pham Ngoc notifications@github.com
wrote:
@rdeutz https://github.com/rdeutz We already support for creating menu
items, so I think it is logical to support template override as well.—
Reply to this email directly or view it on GitHub
#8737 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
This PR has received new commits.
CC: @brianteeman
I have tested this item successfully on 8f00051
Tested and it now works and doesnt include the folder that doesnt have a layout
Category | ⇒ | Administration Front End |
Thanks Brian.
It's not a good idea to add a new way to overrides views. Even, if com_config works with view folder, it is not a good reason to add new overriding method. I would fix com_config view folder.
I stick with the current documented methods: https://docs.joomla.org/Understanding_Output_Overrides
The override system should work with all core supported conventions. Core
supports a singular and plural named view folder so the template manager
should support this convention.
On Saturday, December 19, 2015, Anibal Sanchez notifications@github.com
wrote:
It's not a good idea to add a new way to overrides views. Even, if
com_config works with view folder, it is not a good reason to add new
overriding method. I would fix com_config view folder.I stick with the current documented methods:
https://docs.joomla.org/Understanding_Output_Overrides
This comment was created with the J!Tracker Application
https://github.com/joomla/jissues at issues.joomla.org/joomla-cms/8737
https://issues.joomla.org/tracker/joomla-cms/8737.—
Reply to this email directly or view it on GitHub
#8737 (comment).
I have tested this item successfully on 8f00051
OK... I tested in dissent!
Status | Pending | ⇒ | Ready to Commit |
thanks for testing - set RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Needs Review |
Labels |
Moved to PLT list for a decision
Labels |
Removed:
?
|
Milestone |
Added: |
Status | Needs Review | ⇒ | Ready to Commit |
Milestone |
Removed: |
Milestone |
Added: |
||
Labels |
Added:
?
|
Labels |
Milestone |
Added: |
PLT voted in favor of the change
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-01-17 13:04:28 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
Milestone |
Added: |
Milestone |
Removed: |
Why would you want to do that - what is the use case
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.