Skip to Main Content
Essential SharePoint 2007, 2nd Edition
book

Essential SharePoint 2007, 2nd Edition

by Jeff Webb
September 2007
Beginner content levelBeginner
448 pages
10h 2m
English
O'Reilly Media, Inc.
Content preview from Essential SharePoint 2007, 2nd Edition

Creating Custom Themes

The themes that appear on the Apply Theme page are at this location on the server:

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES

To change an existing theme:

  1. Edit THEME.CSS, .gif, and other files in the theme's folder.

  2. Restart SharePoint by running iisreset.exe.

Changes to a theme automatically appear in sites based on the theme after SharePoint restarts.

To create a new, custom theme based on an existing theme:

  1. Copy and rename a theme's folder in \TEMPLATE\THEMES.

  2. Edit the files in the new theme folder.

  3. Rename and edit the theme.inf file in the theme folder to match the theme's name.

  4. Edit the file SPTHEMES.xml in the \TEMPLATE\LAYOUTS\1033 folder. This file loads the theme definitions in SharePoint.

The theme's .inf file contains the theme's title and localized name displayed for different languages, as shown here:

[info]
title=NewTheme
codepage=65001
version=3.00
format=3.00
readonly=true
refcount=0

[titles]
1031=NewTheme
...

The SPTHEMES.xml file tells SharePoint where to find the theme definitions. For example, the following snippet adds NewTheme to the list of available themes:

<?xml version="1.0" encoding="utf-8" ?>
<SPThemes xmlns="http://tempuri.org/SPThemes.xsd">
    ...
    <Templates>
        <TemplateID>newtheme</TemplateID>
        <DisplayName>New Theme</DisplayName>
        <Description>Demo theme</Description>
        <Thumbnail>../images/thice.png</Thumbnail>
        <Preview>../images/thice.gif</Preview>
    </Templates>
</SPThemes>

You don't have to restart SharePoint ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Office SharePoint® Server 2007 Best Practices

Microsoft® Office SharePoint® Server 2007 Best Practices

Ben Curry, Bill English
SharePoint 2007: The Definitive Guide

SharePoint 2007: The Definitive Guide

James Pyles, Christopher M. Buechler, Bob Fox, Murray Gordon, Michael Lotter, Jason Medero, Nilesh Mehta, Joris Poelmans, Christopher Pragash, Piotr Prussak, Christopher J. Regan

Publisher Resources

ISBN: 9780596514075Errata Page