How to hide main menu in admin panel [Drupal-7]

karthik80c
karthik80c used Ask the Experts™
on
Hi Drupal Experts,

we have a drupal theme that shows the main menu even though we logged in as admin .Its possible to hide that

Thanks in Advance Experts.....
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
What do you mean by "main menu"?

Author

Commented:
means main navigation
What menu (if any) do you expect to see once your'e logged in?
What is the theme that your'e using?
You can do this with editing your page.tpl.php or Template file where the main menu has been defined.

Try adding the condition as below

global $user;
 
  // Check to see if $user has the administrator role.
  if (!in_array('administrator', array_values($user->roles))) {
  // code for menu menu
}

Open in new window

Commented:
Hi,

Go to Structure > Menus and edit main menu. Un-tick where it says "Include this menu in the "the menu selected by the page" menu available to menu blocks"

I hope this will resolve the issue.

Thanks
Screen-Shot-2016-02-02-at-7.43.40-PM.png

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial