I write a opensource programe with yii. People can use it to build an education web site. And I create a theme in the program. Generally people like the theme, but sometimes they would like to custome the main color of the theme in the backend. My question is : how can I let people change the color without changing the code themeselves? That is, How can I main the theme color customable (not creating another theme)
Create different css files with different colors.
Include one of the css files based on an attribute of a ‘SiteSettings’ model in the db.
Or you can include the specified css file by the value of a $_GET param (&style=black) and save it to a COOKIE if isset.