-
-
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
[4.0] Dashboard / Quicktask for 3rd party components #27765
Comments
I believe it there joomla-cms/administrator/modules/mod_menu/tmpl/default_submenu.php Lines 150 to 169 in 7c931f5
The component menu should have In theory it can be enabled by user when he/she create a menu item. |
Afaik, the installation routine doesn't allow for any such special attributes. But yes, it needs to be able to be specified in the component manifest XML where we define the |
@wilsonge Do you think this is a release blocker? Or even a beta blocker? |
Depends a bit how the solution will look. If it needs some change in the architecture to achieve it, then it should be at least a release blocker. Otherwise we're stuck with what we have. |
@Bakual Same for me, that's why I've pinged George. |
Interesting enough, the definition for those special menuitem features are specified in "preset" XMLs in com_menu. This is a hardcoded list of presets: joomla-cms/administrator/components/com_menus/Helper/MenusHelper.php Lines 657 to 664 in 118d4c0
Plus additional presets could be added in a template override folder. But nothing for 3rd party. And nothing for the "Components" submenu in general. Basically what is defined in those preset XML, should be able to be defined also in component manifests. Pinging @Hackwar here since he seemed to be involved in this feature (according to GitHub). Maybe he has an idea how 3rd party can use it. |
@Bakual is there anything still to do here or did I address everything in my PR |
I think you got the icon covered. |
iirc quicktask is the same as the add new function in joomla 3. Was that available to extensions? |
Found the answer for the dashboard |
Yes, it looks the same (not sure if technically, it's done the same). No it wasn't available to 3rd party. That's why haven't filed this as bug but as feature request. I'll have to find sometime to dig into this a bit more. I think I got the clues together to find a solution, just no time yet 😄 |
You can add your own dashboard by simply using a URL like the dashboards for a menu entry in your component. For the icon next to the menu item, you can add the parameter to the XML of the view. That way you can have this in your custom backend menu. For such an icon upon installation, I would (for now) advise to set these parameters in the menu item in an install script, since there you should also create the module instances which should populate the dashboard. Otherwise you would have a dashboard upon installation, but it would be empty... Yes, that isn't ideal, but so far the best solution that I an offer. |
I "think" the question was how to add to the existing dashboards. For example how to add a "backup" component to the system dashboard and not the component dashboard
You can now my PR was merged :) |
That's exactly what I want to prevent. It basically shows that the dashboard functionality wasn't built exactly with 3rd parties in mind. To much special handling for core.
That is not what I meant in this issue here, but is an important request as well. It's bad UX if the user has to manually add such modules to the system view. |
I found a solution to add those dashboard/quicktask icons to the menu. However I'm not closing this issue yet, since there are other aspects (like having presets for the dashboard and "hooks" for the system dashboard) which I believe are not solved. |
One step closer. I can add presets from my own component now. |
Grab the com_modules backend model and use that. shouldn't be too hard. that will ensure the asset gets created |
Yep, but that means every component needs to do that in their custom install script. Imho that's the worst case scenario (not bad, but still worst case 😃 ) |
So write a method in the InstallerScript https://github.com/joomla/joomla-cms/blob/staging/libraries/src/Installer/InstallerScript.php that will insert a module using the backend model. Give people the minimal parameters required and people who need more complicated dashboards can just do use that method as a starting point and copy/paste |
With #28027 I think we covered everything here. Or did I miss something? |
I think thats everything |
Is your feature request related to a problem? Please describe.
The core components com_content, com_menus and com_users feature special menuitems for a dashboard and a quicktask (eg create article)

I found no way of doing the same for my own component.
Since the core components com_banners, com_contact and com_newsfeed also don't have those features, I'm assuming it is missing for regular components that live in the "Components" menu.
This is a pity as those features look very promising.
Describe the solution you'd like
I'd like to do the same for my component what core does.
Additional context
In general, when adding a new feature to core components (especially com_content), we must always make sure the same feature can also be used by 3rd parties.
The text was updated successfully, but these errors were encountered: