-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow including of "parent" menu manifests #10548
Conversation
I succefully tested. #PBFIT This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10548. |
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. |
@Bakual is this still for testing? |
Sure |
After "Apply Patch" got |
Looks like I have to resolve some conflicts first. I'll try to do that tomorrow and will ping you. |
e03e381
to
786d890
Compare
@franz-wohlkoenig Conflicts are solved, it should work again. |
@Bakual Conflicts are solved. Is in menue |
You need to check all the tabs between and including "Details" and "Integration". |
I have tested this item ✅ successfully on 786d890 Category List
Category Blog & ListLayouts: Partial different order inside Tabs (i.E. As Points above are with and without Patch or Side Effects i chose " Tested sucecessfully". This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/10548. |
The ordering can change when an option is only available in one layout. So that would be expected. |
Can you look at resolving the conflicts so that this can be tested please. |
786d890
to
eee64ed
Compare
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. |
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.
Summary of Changes
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 😄
Testing Instructions
category list
andcategory blog
) and verify that all are still there after applying the PRSide Effects
When working on this PR I detected a few inconsistencies between the two layouts:
Position of Article Info
andShow 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 😄