Logged on user theme

Is it possible to dynamically switch the theme based upon the logged on user?  I have a requirement for each logged on user to have their company specific theme.
3 answers


There is also a widget in the appstore just for this use case:  https://appstore.home.mendix.com/link/app/51520/

Hope that helps,



Our front-end dev came up with a solution to a similar requirement, using the Set Attribute widget


You can target where you want to apply a class, use a microflow to determine a class attribute based on the user’s company name, and drop the AppStore widget into your pages.

This wouldn’t allow for total theme overhauls (layouts etc) but would let you control different stylesheets being represented.


There are various ways of doing this.

You can set up something style 1-1 company and stored css in a field, then use some JS in an HTML snippet to load it, or can use a request handler, or a paramterised PRS serving up the CSS with a parameter of the company name

And as in the above you can write a widget or just use an HTML snippet with context to place a class on the <body> and then have your main CSS have those selectors set up for custom styling per that class placed on body.  The class is read from some context object table’s field