If you used MX User Login (Try | Buy) when you built your site, and you want the site menu to display different items for different-level users, these are the things that you should do:
Add a new column (level_mnu) in the database table that stores the menu items information.
Note: The table should have the InterAKT structure required by the Database-driven CSS Menu component (wizard or server behavior).
This new column takes integer values, signifying the site user level. For example, it can take the next values:
-1 - for regular site visitors (not logged-in users).
1 - for regular site users (logged-in).
2 - for the site administrator.
A new filtering condition is needed in the recordset generated by the wizard (or the recordset you created before applying the server behavior): the value of the level_mnu column must be less than or equal to the kt_login_level session variable generated with MX User Login.
The recordset generated by the wizard is already filtered by the visibility column. You can replace this filter or add a new one next to it:
To replace the visibility filter, proceed like shown in the image below:
To add a new filter to the already existing one, switch to Advanced view in the Recordset dialog box, and add the new condition (for PHP: AND level_mnu <= kt_login_level) and the session variable (kt_login_level, having -1 as the Default Value, and $_SESSION['kt_login_level'] as the Run-time Value):
After filtering the recordset this way, different-level users will see different menu items in your site.
|
Jon
Jaques
|
Wow, what a good idea!!!! Lately, I've been building sites which have even greater multiple levels, such as guest, user, admin, superuser. To acheive the right results in some cases I've been building additional sets of files to tie things together, but using these menu levels, I should be able to combine them all together in one. |