[43]Dynamic, multi-level Menu Bars and Control Panels

User avatar
ianmac
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4785
Joined: Sat Sep 24, 2005 11:01 pm
Location: Toronto, Canada

[24]Customizing the Administrator Menu

Postby ianmac » Tue Feb 19, 2008 7:05 pm

Summary
With the release of Joomla! 1.5, the CMS is moving toward a much more modular structure. That is, the core components are getting less and less special treatment, and it is now much easier to implement functionality through developing custom extensions that can replace the core functionality. The user registration and login and authentication processes are prime examples of this, as it is now possible to authenticate users against any number of sources very easily.

There still remain some deficiencies. One significant area is the administrator menu. Everything that is invoked from the administrator menu is a component. From global configuration, to help, to the menu manager, to content. Most of this functionality can be extended or alternatives can be provided using third party components. However, certain core components still get special treatment by nature of their placement in the administrator menu.

Some simple examples are com_content and com_installer. An alternative content component could be developed that could be used as an alternative to the core com_content. So much is possible with the current framework. But a new system would always be second class to com_content, and really only because of its privileged placement in the menu.

A third party installer could also be developed, that would expand on the functionality of the core installer. But an additional installer would always have to be dug into the Components menu.
Additionally, this could really be useful for site administrators where others are working on the site. The menu could be rearranged so that it is more specific to the group that is using the site. Much of the complexity could be hidden so that the interface is even simpler for some users. Users would quickly be able to reach the items they need, and less frequently used items would be hidden.

Functional Goals
The mod_menu module in the backend could be modified to work similar to the frontend menus. Therefore, the administrator menus would be managed in a similar (but not same) as the frontend menus. It should not be possible to add or delete entries in the administrator menu – these entries should only be provided by components (as specified in XML files at install time), only move them to different menus.

As an example, by default, there would be seven menus that come preinstalled: 'Site', 'Menu', 'Content', 'Components', 'Extensions', 'Tools' and 'Help'. These menus by default could have their current items in them. But the administrator would be able to move the items between these various menus. New menus can be created and menus can be deleted, but you must always have at least one menu (and if you only had one menu, all the items would be in that one menu).

It may be desired as well to have an option that would be 'Reset Menu to Default', which would reset all the menus to their original places.

Affect on Change Management
I do not believe that this feature would have a significant affect on change management. It would only be available to Super Administrators. The onus would be on them to use it or not to use it. It may require retraining on the part of the administrator, but that would be a choice that would be made by the organization hosting the site. What I'm trying to say here is that the feature would be transparent unless an administrator decided to use it.

Impact on Existing Architecture
I believe that the impact on the existing architecture would be minimal. The adminstrator menu is handled by mod_menu in the backend. This feature would require a component to perform the management, which could be similar to the existing com_menus.

It would require a change to com_installer so that when components are installed their menu items are added into jos_menu. It would also require an additional field in the jos_menu_types table so that the menus can be distinguished. A better implementation may be to create a new table to reduce the impact on mod_mainmenu that is used in the frontend. If the same table is used, mod_mainmenu must have its parameters revised so that administrator menus cannot be selected for display in the frontend. The same could be said for third party menus.

Functional Description of UI Elements
The administrator menus would be handled in the same way that the site menus are managed, with the following exceptions:
  • There would be no functionality to Edit, Create, Delete or Copy menu items. It is up to the components to determine which menu items are available
  • There would be no default menu item
  • The Published/Unpublished functionality would have the similar effect, except it would be called 'Hide/Show'. This would allow some menu items to be hidden
  • The Hide/Show functionality would have no effect when a Super Administrator is viewing the site. This is to prevent the Super Administrator from irrecoverably destroying the site (i.e. they can't hide key functionality from themselves). If this is implemented in conjuction with ACL, I would expect that this would be true of anybody who is access to modify the admin menus.

Planning Outline
There are three main steps required for implementation of this feature:
  • Modification of com_installer to add component menu items to an admin_menus table.
  • Creation of a new menu manager that would manage the new menu items.
  • Creation of a new mod_menu module to render the new administrator menu.
These three steps are interdependent and so I think it would be necessary to implement them all in one release. I would think that this feature could be developed in one month.

rmullinnix
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 108
Joined: Fri Nov 02, 2007 3:39 pm

[43]Dynamic, multi-level Menu Bars and Control Panels

Postby rmullinnix » Mon Mar 03, 2008 7:04 pm

Summary
Remove hard-coded setup for Administrator menu bar and control panel. Retrieve menu configuration and control panel configuration from the database based on user/group and access privelages. Allow admin menus to be administered through the Menu Manager component. Allow multi-level control panels (hierarchical) where one control panel button can link to a sub-control panel. Allow the administrator menu bar to change according to context of control panel.

Overview
Change mod_menu and mod_quickicon to pull menu and control panel data from the database (#__menus) instead of hard-coding the menus and control panels. When building the menu, the user's group id should be checked and only items that the user can access should be displayed. Create new menu types in Menu Manager to allow for Admin menu items to be created (Menu Bar / Menu Item and Control Panel / Control Button). Allow the image as a parameter and enable the link input field on the menu item edit page. Allow a control panel button to link to another control panel creating the ability to create a hierarchical set of control panels. The top-level control panel would be the set of Joomla core managers. The sub-control panels would be specific to individual components. The Administrator could configure the control panels and group like components together.

Allow the ability to create a Menu Bar template and allow new menu bars to be extended off it. For example, an admin template may have Site, Tools, and Help. The Admin menu bar would build off the template and add Menus and Content resulting in an overall menu of Site, Menus, Content, Tools and Help. Allow additional menu bars to be created that would be specific to the component being managed and synched with the multi-level control panels. So as the administrator navigates the different levels of the control panel, the menu bar changes as well.

see attachments

Change Management
Rows to bulid the Core Adminstrator Menu and Control Panel would need to be stored in database to support backward compatability. Maintaining menu or control panel context (i.e., which level) would require a attribute be maintained which could impact existing components.
You do not have the required permissions to view the files attached to this post.

User avatar
masterchief
Joomla! Hero
Joomla! Hero
Posts: 2316
Joined: Fri Aug 12, 2005 2:45 am
Location: Brisbane, Australia
Contact:

Re: [24]Customizing the Administrator Menu

Postby masterchief » Tue Mar 25, 2008 10:21 am

I doubt we'll be able to squeeze this into 1.6, but it's a darn good idea nonetheless.
Andrew Eddie - Tweet @AndrewEddie
<><
http://eddify.me
http://www.kiva.org/team/joomla - Got Joomla for free? Pay it forward and help fight poverty.

User avatar
newart
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3177
Joined: Fri Sep 02, 2005 10:06 am
Location: Solar system - Earth - European Union

Re: [24]Customizing the Administrator Menu

Postby newart » Tue Mar 25, 2008 10:42 am

...but it is so good that I think it'd be better to insert as accepted for 1.6 anf if not possible (please avoding a no-accepted state), well, for the next stage in a dedicated Accepted-for-next-versions forum... I hope so!
former Q&T WorkGroup Joomla member - Italian Translation Team Member

DavidatMPA
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Mon Dec 31, 2007 9:29 pm

Re: [24]Customizing the Administrator Menu

Postby DavidatMPA » Fri Mar 28, 2008 7:21 pm

I agree, I would absolutely LOVE to see this implemented. I'm in the process of searching for a way to do it in ver 1.0 right now, and couldn't imagine a better solution regarding the authors post.

User avatar
exrace
Joomla! Explorer
Joomla! Explorer
Posts: 281
Joined: Tue Aug 23, 2005 4:55 am
Location: On my CBR 1000rr...

Re: [43]Dynamic, multi-level Menu Bars and Control Panels

Postby exrace » Sat May 31, 2008 5:04 pm

I have created for 2 Joomla 1.5 custom modules that have the edits I wanted to do for both the admin menu and the Control Panel. Not really that hard to do. Biggest issue I found was you can't have two admin menus active at same time using the same core code as you run into a redeclare class issue.

PHP Fatal error: Cannot redeclare class jadmincssmenu in /var/www/vhosts/dev.myhost.com/httpdocs/administrator/modules/mod_myadmin_menu/menu.php on line 182, referer: http://dev.myhost.com/administrator/ind ... s&client=1

It would be great to see menu editor in the core!
Love, Live PHP.
Love, Live Joomla!
Super Sonic Man...do you want to buy a RockeTheme rocket? -Gary Jules


mesum98
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Mar 11, 2009 9:41 pm

Re: [43]Dynamic, multi-level Menu Bars and Control Panels

Postby mesum98 » Wed Mar 11, 2009 9:44 pm

I installed a CB module
http://www.joomlapolis.com/index.php?op ... t+to+owner

Which required me to set position of two items in the menu section. This broke my admin site and got the following error
Fatal error: Cannot redeclare class JAdminCSSMenu in /homepages/34/d43373232/htdocs/umbrella/administrator/modules/mod_menu/menu.php on line 182

Can you help Please

User avatar
exrace
Joomla! Explorer
Joomla! Explorer
Posts: 281
Joined: Tue Aug 23, 2005 4:55 am
Location: On my CBR 1000rr...

Re: [43]Dynamic, multi-level Menu Bars and Control Panels

Postby exrace » Sat Mar 14, 2009 4:41 pm

Do you have access to your mySQL db?
It sounds like you did not heed the warning and have both admin modules using the same position.

Open your mySQL and find this table:
jos_modules

Then find this title:
Admin Menu
Set the position to something other than "menu"
I use "hide" in the instructions.
Love, Live PHP.
Love, Live Joomla!
Super Sonic Man...do you want to buy a RockeTheme rocket? -Gary Jules


Return to “Accepted - Archived”

Who is online

Users browsing this forum: No registered users and 4 guests