Project Description
A simple feature to enable browsing themes based on multiple SPThemes.xml files.

When you add site templates, you define them in webtemp*.xml files, so you don't have to modify the existing webtemp.xml file, but when adding a new theme you must edit the SPTheme.xml file. This simple feature hides the menu original Site Theme link in Site Settings and adds a new Site Theme link which point to another .aspx-file. The code for the aspx is almost identical to the code for the original page (how could we survive without Reflector?), but with the difference that it merges all files starting with SPThemes when browsing the existing themes. So with this feature you can have a spthemestest.xml file, in the same location as the spthemes.xml file, and the files are merged, and you can leave the SPThemes.xml file untouched.

The solution can be deployed at Web, Site, WebApplication and Farm scope. In the source code, I've chosen Farm-level so the new link is used everywhere without activating it at any other level. Note that since it is a set at Farm scope the feature will be activated automatically when deployed.

Only unique themes are allowed so the code strips all duplicates.

Last edited Sep 8, 2009 at 9:55 AM by wosfilm, version 3