Orchard Theme Settings

Topics: Core, General, Writing themes
Dec 18, 2014 at 11:27 PM
Reading the docs, http://docs.orchardproject.net/Documentation/themes (more a discussion of a possible direction for themes in Orchard from long ago), it mentions theme settings via a yaml file. Now I know you can create a theme with a project file and do theme settings like that, but I'm lazy. Was there any reason this kind of settings file was not implemented?
Developer
Dec 19, 2014 at 11:35 AM
Although I see this page for the first time (:-)) I think that note about YAML configuration is about Theme.txt files that are implemented of course. Maybe we could add the ability to read custom key-value pairs from module and theme manifests (as it is with Settings.txts): because now you can add your own data to e.g. a Theme.txt, it won't hurt but it also won't be easily accessible.

But storing custom settings in manifest files would be kind of pointless, since you could only store static configuration there (because modifying these files in production on the fly would be kind of messy, a lot) and then why not store that even in a static class. Or just stick with the global Web.config.
Dec 19, 2014 at 1:01 PM
I was thinking more along the lines of storing the different customizations for a theme in a settings file and then store the actual configuration for the settings in the database. If that makes any sense?
Dec 19, 2014 at 4:15 PM
Hmm I'm not 100% sure how useful this will be but I've started work on it. I've just had a play with a Wordpress theme, it has a seriously rich array of options to choose from. Most of them are totally useless, but they look fancy. I know some Orchard themes (PJS.Bootstrap by Philip) have some cool management features for changing various styles and layouts, so I'm first going to try to recreate those options without having to write any code into the theme. It will probably end horribly.
Dec 19, 2014 at 4:19 PM
And I also don't think this need be limited to just themes, modules could expose theming options too... I can think of several cases where this would be pretty sexy.
Developer
Dec 19, 2014 at 5:29 PM
Would you explain this with a particular example? I fail to see how you want something different then site settings for themes, what you can have today.
Dec 19, 2014 at 7:29 PM
Edited Dec 19, 2014 at 7:31 PM
Because I'm lazy and don't want to have to do any coding. And I like making config files

But yes, you have answered my original question, and it was quite obvious I suppose, the whole settings via a text file was not implemented because you can just do settings via code, which offers far more flexibility