How to make multiple themes for a website?

Asked

Viewed 83 times

-2

How multiple themes work on a website?

I have

themeRED.css e themeBlue.css

Do I have to save the css location to the bank? or there’s an easier way ?

  • How do you want the themeRED.css or themeBlue.css, which configuration, which will be responsible for knowing which theme to use. Example: the logged x user has the theme themeRED.css and user Y has the themeBlue.css, then it would be simple for you to decide who is whose !!! ???

  • 1

    Rod, can you explain it better? Changing the site’s CSS "in real time" can be very useful but it’s not clear that’s what you want, nor how. If you explain it better it makes it easier to answer.

  • 1

    What a mess the reasons are giving to close this question! If it is to close, it would be by "it is not clear what you are asking". Because clearly there’s something not said there that prevents the emergence of an answer "on the fly".

  • I wanted to understand, because, this question was suspended, could be edited and add to that question ... ?

2 answers

1

1

Save the theme name in the database and when loading the CSS file use the user theme string to load the css(s) with that theme.

Ex: "tema1"

HTML:

<link rel="stylesheet" src="temas/tema1/geral.css" />  

Just like Jquery UI does with its different themes... no mystery. :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.