Message Boards

Show menu just for guests

Ace Rhea, modified 4 Years ago.

Show menu just for guests

New Member Post: 1 Join Date: 7/22/19 Recent Posts
Hi,I Have a registration menu, that I would like to hide when the users are logged in because they do not need to know about this menu once they are already registered in the system, so I thought by using the permission configuration in the page/menu, removing the permission of viewer of all group except the guest group, it would work, but I am under impression that every user has guest permission in the three of permission let say that.
thumbnail
Christoph Rabel, modified 4 Years ago.

RE: Show menu just for guests

Liferay Legend Posts: 1554 Join Date: 9/24/09 Recent Posts
Since all users, whether authenticated or not, can see guest content, you can't use permissions for that. It is also somewhat wrong since the guest content isn't actually secret for authenticated users.
I am not sure, what you need to do exactly, but in general you need to add a check to the component to hide it if the current user is not the guest user. If it is really a navigation menu, you could write a template to do that. We also often just do things like that using css. Hide or show things based on some logic.