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