Yet Another Blog Entry on Creating Custom Themes in MOSS

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!

  1. To begin, make a copy of the JET theme folder located in
    C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATETHEMES

    and paste it into the same folder. Name it CUSTOM, all uppercase.

  2. Within the new CUSTOM folder you just created, located the JET.INF file and rename it to CUSTOM.INF.
  3. Open the CUSTOM.INF file and replace the word Jet with Custom.
  4. 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.
  5. 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.
  6. Within the
    C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12TEMPLATELAYOUTS1033

    folder, open the SPTHEMES.XML file and add a new entry for your newly created theme. If you want this list to remain alphabetical, make sure you place the entry alphabetically in the list.

  7. 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!
  8. 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%system32iisapp.vbs /a SharePointAppPool /r

    You can also right click on the application pool in IIS and choose Recycle from the context menu

  9. 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.


No comments yet.

Leave a Reply