Board Logo

Menu items visible depending on the users rights
sommerjack - 9/29/2007 at 03:21 PM

How is it possible to make menu items visible or not depending on the users rights?

In the menu code I am using at this moment, I define all menu levels and items in a jsp page. This makes it possible to control if the items are visible just with a simple if statement.

But in Tigra Menu all levels and items are defined in a javascript file, then how can I control which are visible or not depending on the users rights?

tigra - 9/30/2007 at 02:05 AM

you can do one of the following:
1. move menu from external JS file into the main document and show one hierarchy or another based on the access levels
2. generate the items structure inside the main document or in separate server side script dynamically at the page load time ( see for concept and other forums for working samples)
3. create multiple external static JS files with the items (separate for each user role) and dynamically link one of them based on the current user

Back to forum: