? Success

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
19 Dec 2015

Summary

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.

Testing instructions

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.

avatar joomdonation joomdonation - open - 19 Dec 2015
avatar joomdonation joomdonation - change - 19 Dec 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Dec 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 19 Dec 2015

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.

avatar brianteeman
brianteeman - comment - 19 Dec 2015

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

avatar brianteeman brianteeman - test_item - 19 Dec 2015 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 19 Dec 2015

I have tested this item :red_circle: 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 comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar rdeutz
rdeutz - comment - 19 Dec 2015

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

avatar brianteeman
brianteeman - comment - 19 Dec 2015

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.

avatar joomdonation
joomdonation - comment - 19 Dec 2015

Hi Brian

  1. 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)

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

avatar joomdonation
joomdonation - comment - 19 Dec 2015

@rdeutz We already support for creating menu items, so I think it is logical to support template override as well.

avatar brianteeman
brianteeman - comment - 19 Dec 2015

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/

avatar joomla-cms-bot
joomla-cms-bot - comment - 19 Dec 2015

This PR has received new commits.

CC: @brianteeman


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar brianteeman brianteeman - test_item - 19 Dec 2015 - Tested successfully
avatar brianteeman
brianteeman - comment - 19 Dec 2015

I have tested this item :white_check_mark: successfully on 8f00051

Tested and it now works and doesnt include the folder that doesnt have a layout


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar brianteeman brianteeman - change - 19 Dec 2015
Category Administration Front End
avatar joomdonation
joomdonation - comment - 19 Dec 2015

Thanks Brian.

avatar anibalsanchez
anibalsanchez - comment - 19 Dec 2015

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 at issues.joomla.org/joomla-cms/8737.

avatar mbabker
mbabker - comment - 19 Dec 2015

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

avatar anibalsanchez anibalsanchez - test_item - 19 Dec 2015 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 19 Dec 2015

I have tested this item :white_check_mark: successfully on 8f00051

OK... I tested in dissent!


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar brianteeman brianteeman - change - 20 Dec 2015
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 20 Dec 2015

thanks for testing - set RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Dec 2015
Labels Added: ?
avatar rdeutz rdeutz - change - 20 Dec 2015
Status Ready to Commit Needs Review
Labels
avatar rdeutz
rdeutz - comment - 20 Dec 2015

Moved to PLT list for a decision


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar joomla-cms-bot joomla-cms-bot - change - 20 Dec 2015
Labels Removed: ?
avatar rdeutz rdeutz - change - 13 Jan 2016
Milestone Added:
avatar rdeutz rdeutz - change - 13 Jan 2016
Status Needs Review Ready to Commit
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jan 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 13 Jan 2016
Milestone Added:
Labels Added: ?
avatar rdeutz rdeutz - change - 13 Jan 2016
Labels
avatar rdeutz rdeutz - change - 13 Jan 2016
Milestone Added:
avatar rdeutz
rdeutz - comment - 13 Jan 2016

PLT voted in favor of the change


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8737.

avatar wilsonge wilsonge - change - 17 Jan 2016
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2016-01-17 13:04:28
Closed_By wilsonge
avatar wilsonge wilsonge - close - 17 Jan 2016
avatar joomla-cms-bot joomla-cms-bot - close - 17 Jan 2016
avatar wilsonge wilsonge - reference | bd298d4 - 17 Jan 16
avatar wilsonge wilsonge - merge - 17 Jan 2016
avatar wilsonge wilsonge - close - 17 Jan 2016
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2016
Labels Removed: ?
avatar wilsonge wilsonge - change - 17 Jan 2016
Milestone Added:
avatar wilsonge wilsonge - change - 17 Jan 2016
Milestone Removed:
avatar joomdonation joomdonation - head_ref_deleted - 17 Jan 2016

Add a Comment

Login with GitHub to post a comment