Is it possible to hide or change the position for the main menu.
I write a plugin, and I want it to show in the first menu. And the default menu is my plugin, not dashboard.
In plugin manger, I can only desactive the plugin, and there is no way to hide the menu.
Some ideas for this feature:
1. add hooks like this
"Piwik_Menu.remove" : hide the menu
-"Piwik_Menu.move" : change the position of menu
-"Piwik_Menu.default":set the default menu to show when we visit piwik/index.php
With these hooks, we can write a plugin to achieve this feature.
1. Administrators can show different menu for different user.
I don't think hooks should be used to change the behaviour of other plugins. Once #24 is done, it should be possible for plugins to provide this level of configurability.
In the meantime, please look at core/PluginsFunctions/Menu.php. You might be able to use Piwik_RenameMenuEntry() and Piwik_EditMenuUrl(). If you need more functionality here, submit a patch for your use case.
One change might be to have the menu based on priorities to decide the order.
For example, dashboard would be priority 10, Actions = 20, Referers = 30, etc.
Then a method would allow to change priority of a given menu entry.
Any new menu added could put itself first (by setting any priority < 10), or in the middle of any other menu entry (for example, priority = 15 would put it after dashboard before Actions)
I think hide some menus is also necessary. Sometimes we don't want to show some menu but we want it be actived.
This was implemented in Admin menus recently, see the function and code in: https://github.com/piwik/piwik/blob/master/core/PluginsFunctions/AdminMenu.php#L105
function Piwik_AddAdminMenu( $adminMenuName, $url, $displayedForCurrentUser = true, $order = 10 )
This could be done for the normal menu, and top bar menu too.
This was fixed in #1403