User tests: Successful: Unsuccessful:
Pull Request for Issue #27765.
This changes the Installer ComponentAdapter so it reads optional menuitem parameters from the XML and puts them into the #__menu table.
This allows to set menuitem params for the admin menu during component installation.
This is especially interesting so we can add dashboard and quicktask links to our component submenus.
The XML structure for params in a menu or submenu will look like this
<administration>
<menu>
COM_FOO
<params>
<param1>value1</param1>
</params>
</menu>
<submenu>
<menu view="bar">
COM_FOO_MENU_BAR
<params>
<param2>value2</param2>
<param3>value3</param3>
</params>
</menu>
</submenu>
</administration>
You can either adjust the XML manifest of a component of your choice, or use my SermonSpeaker component where I added params to show a dashboard link and a quicktask link.
com_sermonspeaker.zip
With my component you'll see dashboard and quicktask icons in the component submenu:
If you do it with another component, you can also check the #__menu table entry and see if the params
column got an entry like you specified it.
There is no possibility to add params during installation (without a scriptfile)
That should be added to the "Develop a 4.0 component" (or how that is called) doc. If there is another doc for the component manifest, it should be added there as well.
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
I have tested this item
Cool, what a few lines of code can do in J4 if they are clever made.
@brianteeman I don't think the documentation needed should keep me from setting RTC, or should it? And should I set label "Documenation required"? Feedback welcome.
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
?
?
|
I see you have done what you asked which is correct
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-02-08 18:15:34 |
Closed_By | ⇒ | infograf768 | |
Labels |
tks
I have tested this item✅ successfully on 66a3e3c
Awesome - definitely needs documentation
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27849.