Master Posted October 26, 2016 Report Share Posted October 26, 2016 I need to see different menu links based on the role of the user who logged in Quote Link to comment Share on other sites More sharing options...
MayMusic Posted October 26, 2016 Report Share Posted October 26, 2016 Let's say you have a Role field in Authentication table with these Roles: Admin Manage User Create a HTML DataPage and click on source and use the code below: <div id="menu"></div> <script> if("[@authfield:Role]" == "Admin"){ document.getElementById('menu').innerHTML = '<a href="">Home</a><br /><a href="">Admin Report</a><br /><a href="https://b3.caspio.com/folderlogout">Logout</a>'; } else if ("[@authfield:Role]" == "Manager"){ document.getElementById('menu').innerHTML = '<a href="">Home</a><br /><a href="">Manager Report</a><br /><a href="https://b3.caspio.com/folderlogout">Logout</a>'; } else if ("[@authfield:Role]" == "User"){ document.getElementById('menu').innerHTML = '<a href="">Home</a><br /><a href="">User Report</a><br /><a href="https://b3.caspio.com/folderlogout">Logout</a>'; } </script> Quote Link to comment Share on other sites More sharing options...
Kurumi Posted March 25, 2022 Report Share Posted March 25, 2022 Hi - sharing this new post! Quote Link to comment Share on other sites More sharing options...
autonumber Posted January 12, 2023 Report Share Posted January 12, 2023 Hi! If you want to have a navigation menu based on roles, you may check this forum post: Quote Link to comment Share on other sites More sharing options...
PotatoMato Posted March 14 Report Share Posted March 14 Hi! Just to update, Caspio has an article about custom navigation menu based on user role: https://howto.caspio.com/tech-tips-and-articles/customizing-navigation-menu-based-on-user-roles/ -Potato Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.