Skip to main content

Hello,

 

Is there a way to create a page element or menu element that is only visible to specific user roles?

Use case:

We have a custom page that we restrict to certain User Roles. We would like to put a link to that page on our main page, Ideally in the Mega Menu, a button (in a widget)  would work also.

Is there a way of achieving this use case in the current environment? Or is it possible to do with some scripting?

 

Yes, I’ve done this a number of times with third party scripts. Both the widget approach and the Mega Menu approach. 

Support has been very helpful in helping me figure this out. 

The Mega Menu part of this is actually quite easy. I call it “Phantom Categories” 

  1. Create the category where you want it in your Mega Menu
  2. Set the category permissions accordingly (only visible to certain roles)
  3. Use a third party script to redirect the link to that category to the custom page

Widgets are a bit trickier, as it’s a more complex script needed and you need to use the Inspect tool from your browser console to identify how to target the script to just that widget.

But the short answer is: yes, this is possible. Talk to support about helping you out. 

 


Thanks @DannyPancratz great to hear it is possible.

Now to work out exactly how we want to implement it.

 


Reply