How to hide Admin Menu (backend) in Joomla 3?

mmm picture mmm · Sep 19, 2014 · Viewed 7.3k times · Source

How to hide 'System > Control Panel', 'Components', 'Help' these 3 menu items in joomla3? Sorry not enough reputation to post image. =.= Certain user groups do not need to access/view these. I have hide the rest such as 'Users', 'Menus', 'Contents', 'Extensions' but can't hide these.

Answer

emmanuel picture emmanuel · Sep 19, 2014

Removing help item could easily done from:

Extensions -> Module Manager -> Administrator -> Admin Menu -> Advanced -> Help Menu: Hide

For the rest of the menu items you have to make an override to the admin menu module.

You have to download:

/administrator/modules/mod_menu/tmpl/default_enabled.php

And copy to:

/administrator/templates/*your_admin_template/html/mod_menu/default_enabled.php

You have to check if active user is not to the level that you don't want to show the menu item (id: 18) in our example. So for control panel item you have to change:

$menu->addChild(new JMenuNode(JText::_('MOD_MENU_CONTROL_PANEL'), 'index.php', 'class:cpanel'));

To:

if(!in_array(18, $user->groups)){
$menu->addChild(new JMenuNode(JText::_('MOD_MENU_CONTROL_PANEL'), 'index.php', 'class:cpanel'));
}

And for components menu you have to find:

if ($components)

And change to:

if ($components && !in_array(18, $user->groups))

Good Luck!