Style/Theme switcher

Style/Theme switcher

How do I change(switch) eSpace user custom theme based on which user has logged in?

Example -
User: ABC logs in, use companystyle123.css, change default logo image to companylogo123.jpg

User: XYZ logs in,use companystyle456.css, change logo image to companylogo456.jpg

User: Alice logs in,use companystyle456.css, change logo image to companylogo456.jpg
Hy Robert!

You can make that by creating several css classes, like ".Emp456Login", in combination with the Extended Properties you can override the default style used.

Name: style
Value: IF(LogedInEmployee = Emp456, "class = Emp456Login" , "")

You can override it has mutch times has you want. You can use it on every place.
Has for images you can simply use and if on screen selecting the image that you want to use according to the user that is loged in. But if you have the css loading the images I see no problem using the first way.

it will give you a lot of work, but it will work!

On the other hand you could try make a javascript function that would change the css loaded on the onLoad of the page.

Hi Robert,


One other way is defining a dynamic URL for your external style sheet (eSpace properties), say '/MyApp/DynamicCSS.aspx'

Then you just have to create an entrypoint/screen with that same name and return the proper web.css through the Download widget in the Preparation action of that screen.


You can then add further logic to the Preparation such as identifying the user and provide her the proper stylesheet.


Let me know if it helped.


Kind regards,


Hi everyone.

I need to do something similar, and I've created the entry point and the screen preparation action, but then I hit an obstacle:
Where do I place the css file and how do I get it for download?

I don't want to always be copying and pasting the CSS to some huge text variable or assignment action, so I started by importing the .css file into the resources folder of the eSpace. Now my problem is that I don't know how to reference the file to put it through the Download action.

My question: How can I get this file for the download widget? Or, if you guys know of some better way of doing this, what way is that?

Thank you very much.

Filipe Silva
And, as expected, I found the solution to my problem right after posting the question...

In case anyone has the same problem (and degree of laziness as to come here asking for help before really trying), here is the solution:

- Import the file into resources
- Assign that file to a Binary data variable
- Place that variable as the File content of the download action

Yes, it is simple. Sorry for bothering.
Also check this: Agile Platform Tips & Tricks #7 - How to change the page styles dynamically at runtime. In the example the selected style sheet is stored in a session variable, but you can easily change it to be stored in a database table instead.

Best Regards,
Gustavo Guerra
For anybody looking for the link the Ovatsus posted, it's here:
Hi pedro,

Can u please provide me a sample oml for this.

Hi Filipe,

Can u plz provide me a sample oml for this.. it would be a great help.