695
Views
4
Comments
Solved
Is any possible to Change my web application theme dynamically?
Question

I use Outsystem 11 and my environment in cloud

i need to change my theme dynamically

Is any possible to Change my web application theme dynamically?

2019-06-15 21-39-22
Afonso Carvalho
 
MVP
Solution

If you want to explore this, while Outsystems has an AddStyleSheetTag method in the HTTPRequestHandler espace, I don't see an easy way to reverse it (unload) the selected CSS. I'd probably look into Javascript to load/unload CSS:

https://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript

2019-06-17 13-57-32
Umar Ali

Afonso Carvalho wrote:

If you want to explore this, while Outsystems has an AddStyleSheetTag method in the HTTPRequestHandler espace, I don't see an easy way to reverse it (unload) the selected CSS. I'd probably look into Javascript to load/unload CSS:

https://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript

Thanks


2019-06-15 21-39-22
Afonso Carvalho
 
MVP

Hi Umar,

In theory, you could dynamically load/unload specific CSS files to change certain parts of your layout, but not all of it, and not the entire Theme. This would also make development pretty complicated since you'd only be able to preview one set of layouts.

Can I ask what you're trying to accomplish with this?

2019-06-17 13-57-32
Umar Ali

Afonso Carvalho wrote:

Hi Umar,

In theory, you could dynamically load/unload specific CSS files to change certain parts of your layout, but not all of it, and not the entire Theme. This would also make development pretty complicated since you'd only be able to preview one set of layouts.

Can I ask what you're trying to accomplish with this?


Hi Afonso,

Thanks for reply

just a try,  to change theme based on user choice 

2019-06-15 21-39-22
Afonso Carvalho
 
MVP
Solution

If you want to explore this, while Outsystems has an AddStyleSheetTag method in the HTTPRequestHandler espace, I don't see an easy way to reverse it (unload) the selected CSS. I'd probably look into Javascript to load/unload CSS:

https://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript

2019-06-17 13-57-32
Umar Ali

Afonso Carvalho wrote:

If you want to explore this, while Outsystems has an AddStyleSheetTag method in the HTTPRequestHandler espace, I don't see an easy way to reverse it (unload) the selected CSS. I'd probably look into Javascript to load/unload CSS:

https://stackoverflow.com/questions/574944/how-to-load-up-css-files-using-javascript

Thanks


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.