mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #20741
[Bug 1372536] Re: PluginModule-menu items appear in two menus
After investigating a bit more about the menu-structure and
understanding in more detail about how the menus are built, I realized
that the problem is not specific for the module plugins but is the same
for interaction and artefact. The active menu-items are filtered by
their path: Every entry whose path starts with "settings" or "inbox"
gets displayed in the upper right corner, for the main menu, the active
elements start with "content", "myportfolio" and "groups", plus admin
for admin user.
To get a menu item into the first level, it would need a path without a
'/', but with the two identical calls, the menu item directly appears in
both menus.
Are plugins not meant to add anything to the first level of any of the menus? If not, I'm not sure what would be the easiest way to allow that. menu_items could accept a string (by default ignored) for the different menus, to adjust the output regarding on the menu it is called for. But that would compete with the logic of putting menu items into the menu using their path.
There could be another path level for the side-menu, but that would mean changes for all plugins that add to the right-nav menu and I think it would clash a little bit with the actual concept where you could add a complete menu-item subtree to the right-nav by adding the parent-entry to the right_nav()-function.
Or there could be another function right_nav_items() for plugins, also weird when there is already the possibility to add subentries to the "settings" menu for example using the menu_items() function.
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1372536
Title:
PluginModule-menu items appear in two menus
Status in Mahara ePortfolio:
New
Bug description:
With a module-plugin, that overwrites menu_items, the returned menu
items appear in the main navigation and also in the top right corner.
Both are very helpful on their own, but it should be possible to add
an item to either of them without the other, like, have an entry only
in the upper right corner but not in the main menu or vice versa.
The calls are indistinguishable (as far as I see) and originate from
web.php::main_nav, line 2683 and web.php::right_nav, line 2741
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1372536/+subscriptions
References