User tests: Successful: Unsuccessful:
Pull Request for Issue #27765.
This tackles the issue that 3rd party components couldn't easily have presets menus (eg for the dashboard) like core components have.
Currently, the list of presets is hardcoded in the menuhelper. This PR changes this to a dynamically loaded list. It looks in each enabled component if there is a presets
folder and loads all XML presets found there.
This also moves the existing component specific presets for com_content and com_users to their respective component folder, instead of having them in com_menus.
The language strings are taken out from mod_menu.ini and lib_joomla.ini and moved to the place where the corresponding presets lives, so either com_content, com_users or com_menu (for the "system" ones).
After applying the PR, check that the menu (main and alternative) and the various dashboards still work as expected.
To test 3rd party, you can copy an existing preset file to a 3rd party component and renamed it. Then see if it shows up in the presets list in the "Administrator Menu" and "Administrator Dashboard Menu" modules.
Or you can use my component and see if the "SermonSpeaker Dashboard" Preset comes up there.
com_sermonspeaker.zip
Presets are loaded from component folders as well and all component specific assets (preset, language strings) are contained in the component folder.
Presets are hardcoded in com_menus. Language strings reside in lib_joomla and mod_menu.
Probably in the 4.0 Component development guide.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content com_menus com_users Language & Strings |
Title |
|
I have tested this item
Tested with an own component.
After test, the Warning for missing parts of the menu of my own componente is incomplete: "The administrator menu jottovoter does not have - Menu Manager. Select to turn on the menu recovery mode." - Does not have what?
EDIT: Message is not incomplete but confusing.
But this is out of scope of this PR.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-11 07:12:57 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
?
|
One thing to think about is that all presets are currently using the same "namespace" (for lack of a better word). Which means if another component uses the same preset name as another (eg "default"), the first one gets overwritten.
However that is already the case today as you can register own presets programmatically using eg a plugin.
Thus I thought it's out of scope for this PR.