Announcements
This site is in read only until July 22 as we migrate to a new platform; refer to this community post for more details.
Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to hide page elements for unauthorized users in the dev portal?

Not applicable

I'm trying to hide menu items in the navigation bar for unauthorized users (not logged) as well as the search bar that is outside the navigation bar.

In other words, only logged users can see them. Is this possible?

Thanks in advance.

0 3 329
3 REPLIES 3

Hi @Jorge Huang,

You can hide specific menu by using the drupal module which name is "menu_item_visibility" just download it from the drupal website and place in custom folder of module it will show the check box in your menu when you will open it in admin mode just check it for authenticated user OR your specific role.

Or else https://www.drupal.org/project/menu_per_role is another contributed module which allows you to hide the menu item based on used role.

Hi @Jorge Huang Menu for anonymous users:- http://<hostname>/admin/people/permissions/1 Node--> uncheck View published content.

This results no published content can be viewed by anonymous users for dev portal.