If you’d like to create a custom theme to brand your SharePoint site, it’s relatively straight forward. Howevere, before you begin, I’d definitely recommend reading Heather Solomon’s blog post on Master Pages vs Themes. It’s a great discussion on the advantages and disadvantages of both methods. Comments are most welcome!
- To begin, make a copy of the JET theme folder located in
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\THEMES
and paste it into the same folder. Name it CUSTOM, all uppercase.
- Within the new CUSTOM folder you just created, located the JET.INF file and rename it to CUSTOM.INF.
- Open the CUSTOM.INF file and replace the word Jet with Custom.
- Within this folder, you will find a theme.css file. This is where you’ll be making your edits to the css to acheive the look you desire.
- Up until this point, SharePoint is still not aware of the new theme you’ve just created. There’s one final edit you’ll have to make to the SPTHEMES.XML file.
- Within the
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033
- Obviously, we don’t have a thcustom.gif image at this point in time because we have not actually made any changes to the theme.css file. Once you’ve completed that, and you’ve achieved the look and feel that you’d like, you’ll want to take a screenshot and create an image and store it in the located indicted in the SPTHEMES.XML file. Just a note, typically, I’ll open up an existing image, like the thjet.gif in Photoshop or some similar program to determine the image size. I then resize my screenshot to match. If someone has a better suggestion for doing this, I’d love to hear it!
- Save your file and reset the IIS pool for that web app. Alternatively, you can do an entire IIS reset. The syntax for recycling the application pool is as follows (Resource for this was Developer’s Guide To Windows SharePoint Services 3.0):
Run the following command where SharePointAppPool is the name of the application pool that needs to be reset:
%systemroot%\system32\iisapp.vbs /a SharePointAppPool /r
You can also right click on the application pool in IIS and choose Recycle from the context menu
- One thing to note. I’ve found that when making edits to my theme, they don’t show up right away. After saving the theme.css file, within SharePoint, I have to switch to another theme, then change back to my custom theme and do a page refresh before I see my changes take effect. I am not sure what causes this behavior, but just keep that in mind when testing out your changes. You won’t see them by simply refreshing the page while your theme is active.