User tests: Successful: Unsuccessful:
When we have multiple layouts (menu item types) for the same component view, we more or less copy the whole manifest and just add or remove a few parameters from it. The rest is duplicated code.
This can be seen for example when looking at the manifests for the com_content category view and its two layouts (blog and list/default).
When we add a new feature to the view itself, we have to maintain the parameters in both layout manifests.
This PR makes use of the existing (probably not very well known) view and component manifest feature. Instead of duplicating the parameters in each layout manifest, we now can just specify to include the view and/or component manifest file and put the shared parameters into those manifests.
With this PR Joomla will now first load the layout manifest file (eg the default.xml one) and if it specifies to load one of the "parent" files it will load the view and/or the component one (metadata.xml).
When parameters are specified in multiple files, then the layout file takes precedence over the view file over the component file.
Also parameters specified in the "parent" files will appear after the parameters defined in the layout file.
This PR changes the menu item model to load those option files and moves the shared parameters from the com_content category view to the view manfiest file so we have a good test case
category list
and category blog
) and verify that all are still there after applying the PRWhen working on this PR I detected a few inconsistencies between the two layouts:
Position of Article Info
and Show Tags
. Those are used in the blog layout itself (and not in the list layout), however in the single article view they exist as well. We could move them to the view file as well but I left it for now since it is a good showcase for how it will work Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Labels |
Added:
?
|
Category | ⇒ | Administration |
What if we want to inherit all parameters but one from the parent xml? Is there anything possible than again doing it the old way?
I doubt this can be done easy. It would need at lot more fiddling with JForm than what is currently done.
It for sure is not in the scope of this PR. If accepted, the feature may be expanded afterwards in separate PRs.
Sure
After "Apply Patch" got "Error: The file marked for modification does not exist: components/com_content/views/category/metadata.xml
Looks like I have to resolve some conflicts first. I'll try to do that tomorrow and will ping you.
Category | Administration | ⇒ | Administration com_menus Front End com_content |
@franz-wohlkoenig Conflicts are solved, it should work again.
You need to check all the tabs between and including "Details" and "Integration".
The "Link Type" and the ones after that one are coming from a different source haven't changed.
I have tested this item
Show Associations
shows now Use Global (Hide)
Use Article Settings
not shownPage Subheading
before & after Patch not shownLayouts: Partial different order inside Tabs (i.E. # Articles to List
is now on top of second row)
As Points above are with and without Patch or Side Effects i chose " Tested sucecessfully".
The ordering can change when an option is only available in one layout. So that would be expected.
Your results look as expected I'd say.
Can you look at resolving the conflicts so that this can be tested please.
Rebased and fixed conflicts.
I'm closing this PR because there seems to be little interest and resolving the conflicts is to risky by now.
If the interest arises for some reason again, it is easier to just rebuild the PR.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-01-08 14:47:12 |
Closed_By | ⇒ | Bakual |
I succefully tested. #PBFIT
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10548.