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 261
3 REPLIES 3

abdulz_khan
Participant IV

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.

jaywanttopno
Participant III

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.

ukmakineni
Participant I

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.