1

We use Sharepoint 2010, and I want the ability to make sophisticated themes for my sub-sites and have them apply site-wide. My current plan is to use a method similar to modernizr, and simply add a theme class on the HTML or BODY tag. For instance:

<html class="theme-01 site-icon-01">

And then in the css simply reference that like:

.theme-01 .content-area { color: #330000; }
.theme-01 .content-area { color: #003300; }

The built-in Sharepoint theming capabilities are too limited for what we want to do, so my thoughts are to to store this in a list, or some custom site-setting, and then somehow reference this in the master page so that it can add the appropriate class(s).

I would rather not have to make a new master-page for each site theme.

Unfortunately, I'm not sure how to wire this all up at this point, and I would appreciate any help or suggestions.

2
  • 1
    Before going into an answer, how far away is your organization from upgrading to Sharepoint 2013? The reason this is a concern is because all aspects of theming and rebranding change completely in SharePoint 2013 and it is very likely that anything done in 2010 will need to be completely reworked in 2013
    – Dave Wise
    Oct 18, 2013 at 21:19
  • Likely a year or more. This will need to be 2010.
    – Ustice
    Oct 19, 2013 at 18:43

2 Answers 2

1

If you enable publishing, you can manually specify a CSS file for each site directly in Site Settings. While not a user-friendly approach, it is built in and can be done without any code. All you would have to do is create all of your CSS files in a central location with a good naming convention and then all other sites could simply include whichever one they want.

Beyond that, you could add the CSS include and any javascript includes within a delegate area in the master page. Then you could use Visual Studio to create solutions that would deploy the appropriate theme to the delegate region. This would be friendlier in that individual site owners could simply enable the feature for the theme they want and it would have a friendly name and description.

Another option would be to create a custom user control in Visual Studio and include it on the single custom master page. This control could query a list in the root of the site collection (or in the root of the site for local control) and pull theme information from there (js, css, logo) and then write it into the page.

How extensive you want to go depends on your specific needs but keeping a single master is easily achievable.

0

There are tons of themes that ship out of the box. If none of them fit the bill, then you can customize the as needed. I vaguely remember reading an article once regarding using PowerPoint to creat a theme and export it, then being able to add it to sharepoint.

http://www.dummies.com/how-to/content/create-a-custom-theme-for-sharepoint-2010-using-po.html

If you need to alter more than the theme, IE the layout of the masters age and its elements, then I would suggest implementing a minimal master page and building as you need.

Hope this helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.