[Multi Theme Library] Don't understand how to use the Multi Theme component
Forge component by Experts
Application Type

Hi there.

I recently installed the Multi Theme component into my environment, but I can't really finish figuring out how to use it. 

I already figured out how to use the component to create new themes.

But here's what I want to do: allow the user to select from a list of available themes for the app. So, now that I've stored this themes in the database using the component, how do I show the user the available themes? How do I let them choose one? How do I apply this theme to the application?

I'd really appreciate some feedback on this :)

Hi @Yizuhi Galaviz, 

I have never used this component, so I do not know if the available demo helps answer your question. but I just wanted to make sure you were aware it came with a demo that you could check out.



Thank you. Unfortunately, I had already checked the demo. So far I've gotten nothing out of it. Guess I'll keep trying to understand it.

I ran into some issues with the demo myself, but from what I gather from the demo, if you have already stored your themes in the database, then basically:

1 - You drag the MultiTheme block onto the screen

2 - Use "GetActiveTheme" (client action) to load the default theme you want to start with which is stored in a client variable (under Data tab as shown below).

3. Let user choose alternative themes (reference 'Profile' screen in demo) the 'active theme' is stored in a client variable and thereafter you can switch themes using the "SetActiveTheme" client action.

Hope this helps a bit.



Thanks a lot for your help, I will try and see how it goes.

Hey. I just figured out how to do it, the demo and your advice helped a lot. However, I'm having a problem with the URLs for custom themes. I have a theme called BlueTheme inside my StyleGuide library, which is a module of my app. The URL I used for the component to access this theme was: "/StyleGuide/css/BlueTheme.BlueTheme.css" (based on the URLs I saw in the demo).

This, however just loaded an empty stylesheet instead of the stylesheet I had defined for BlueTheme.

Any idea of where I could have gone wrong?

Glad to be of help @Yizuhi Galaviz,

I did not understand all the details of your set up. So let's assume the following as an example:

Your style guide module name = "MyStyleGuide"
Your theme name= "BlueTheme"
Your module with MultiTheme dependency = "MyMultiThemeDemo"

Then your CustomThemeURL should be: "/MyMultiThemeDemo/css/MyStyleGuide.BlueTheme.css"



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