We use cookies to improve our services and provide a better experience. By continuing to use this site, you agree with our Cookies Policy.

Tutorials

More than 400 step-by-step articles to guide you through online project development.
HomeTutorialsCMS TutorialsDrupal

How to Hide Drupal 7 Menu Item for Anonymous Users

Cloud Servers 727 × 90

While Drupal allows setting permissions for the users, it is also possible to configure which place of the website they are allowed to see and which not. This means we can hide menu items for authenticated, administrators and anonymous users. This feature can be useful to hide particular content which we don not want to show for particular group of users.

Follow These Steps to Hide Drupal 7 Menu Item for Anonymous Users

Start by logging in to Drupal admin panel and navigating to “Structure>Menus>Blocks administration page”. There you will find a list of available menu items and have a possibility to assign a block to the region. But as you will be adjusting permissions for specific menu items, you will need to click “configure” for the selected menu item. In the next page it will provide functions for managing this menu item.

One of the function is visibility settings. There it is possible to configure visibility for pages, content type, roles and users.

Drupal menu visibility settings

“Roles” tab it will show you the options that you can use to set which users group can see the specific menu item. In case you want to hide the item only for an anonymous user, you might need to select the rest user types. In other words, you will need to select checkboxes for “authenticated user” and “administrator” leaving “anonymous user” unchecked.

Once done with the settings, click “Save block” at the end of the page to apply the changes. Since you have applied hide settings only for anonymous users, to check if it is actually working you will need to open website as a logged-off visitor.

Rate this Tutorial:
One Comment Leave a Comment
  1. rockandroller

    doesn’t work for me… trying to hide a menu item in the User Menu. When anon is browsing – the user menu is gone – EXCEPT this link. Configured as you suggest above

    Reply
Leave a Comment

Cloud Servers 1 230×230

Other (195)

Popular Keywords

Web Banner 4 230×230