Different index pages per user role?!

4
Hi, I've managed to create a suite of different themes per user role by adding a custom javascript that allows the path of the mxf's (e.g. href="navigation/mxtoolbar.mxf) and the "custom.css" files to change upon loading the page according to the user logged in. So now if I login as User A, the path in that href changes to 'href="UserA_theme/navigation/mxtoolbar.mxf"', <link ...="" href="UserA_theme/custom.css"/> ... and so on. It works as long as the page is completely refreshed. The meta-tags for the no-cache are all in place and this approach works but in an intermitent way (which is a problem, as it reverts back to the default theme once in a while). I've also thought that if in the index3.html the path for the theme in the head of the html document can remain in a more permenant format, then I have no further issues with caching, so my question is... Is there a way to have different index<n>.html which can be retrieved according to user role? If so, where/how can I trigger this from? Regards, Luis.
asked
1 answers
3

Hi Luis,

there currently is no way to selectively re-direct a user to a different index[n].html page based on the User Role. The user is directed to index2 or index3 based on whether or not a Navigation tree has been configured for the project.

Using custom JS to change certain attributes of the page depending on User Roles is an interesting approach. You can find some example code for loading it consistently in answer to your question here https://forum.mendix.com/questions/408/mxsessionloaded.

answered