Navigation Menu item: Conditional visibility?

1
Under the basic project navigation (home, signing, other items you want to show, etc), is there a way to have the visibility depend on some kind of variable or field OTHER than user role? The user role seems to be built in, which is great. But sometimes I’ll have a field in another entity that associated to a user account that I would like to determine the visibility of a menu item. Is it possible to hide/show menu options based on something like that? If not, is there another basic menu in the App store that someone can recommend that works just like the built-in navigation menu that has this ability?
asked
3 answers
2

Brian,

I don’t think there is an out of the box tool that works this way.  You could use Action buttons and conditional visibility to build something similar out of the box navigation.  Maybe others in the community have suggestions too.

Mike

answered
1

Brian,

Since you already explored the role based access and it does not suite you, I suggest the following which I did for my project and its working.

  1. Go to the master layout where menu bar will be shown
  2. Have a dataview to retrieve the object which has attributes to restrict menu’s
  3. Add layout grid or container with conditional visibility based on the attributes (as per your requirements)
  4. Inside the layout grids or container, you can have different menu bar’s specific for that condition.
  5. Now different menu bar shown for different conditions
  6. Its easy to maintain menu bars in Mendix than buttons (also will avoid styling issues)
  7. This might get cumbersome if you want restrict menu-submenu items too.

- Nirmal

answered
1

We create a NP object when the user logs in and then determine which navigation to show. We have a master layout like this:

And the snippet looks like this:

And we style it with some classes. 

This way we can adjust by role what we show in this menu.

Regards,

Ronald

 

 

answered