Adding Themes the supported way! - Robin zevenseas SharePoint Blog
Ever screamed at SharePoint that Themes are such a hassle and you have to jump through hoops to make your custom themes selectable by the end user?
Up until recently the only options were to either create a feature which applies the custom theme or to muddle with the SpThemes.xml file (preferrably also done through a feature).
Robin on the other hand came up with a better solution. He created a solution which has a configuration interface in CA which allows admins to define multiple themes.xml files (no muddling with built in files that are prone to be overwritten in an upgrade).
To load the custom xml file he used a feature to hide the existing site actions menu entry and replaced it with his own application page. There he loads the default themes and custom themes into one dataset and displays them as if nothing had changed.
But be warned! Although he spent much effort on sticking to the API and the way it was coded previously (Reflector is such a great tool) his solution is not 100% upgrade proof. If the MS developers decide to change the way themes work and muddle with the classes the page could crash. But that's the beauty of features. Deactivating the feature will remove the new link and put the old link back and you're back to Vanilla.
Happy theming!
No comments:
Post a Comment