Jun13

Create a Custom Theme for WSS 3.0 or MOSS 2007  

Categories: Branding

SharePoint Out-of-Box Themes

If the blue and white default theme for SharePoint does not fit your style, you can choose another theme in WSS 3.0 or MOSS 2007.  SharePoint provides 18 themes out of the box.

clip_image002

 

To change the theme of a site

1. Select Site Settings under Site Actions

2. Click on Site Theme under Look and Feel

clip_image002[4]

 

3. On the Site Theme page, you can select different themes and you’ll see a preview of that theme on the left. Once you have decided on a theme, click the Apply button.

clip_image004

 

Viola! Your site now has a new look and feel.
clip_image006


Create a Custom Theme to apply

But what if you don’t want to use an out of the box theme? Create your own!! To create a custom theme for applying to sites, you need to re-purpose an existing theme. It’s quite easy with a few modifications. If you can copy/paste, you can do it!

Step 1 – Copy existing theme

  1. Choose a theme to re-purpose (something that closely resembles your desired look)
    • For our example, we are using “Wheat”
  2. Choose a name for your new theme
    • For our example, we will use “LewTek”
  3. Copy the chosen theme in the themes folder in 12 Hive
    • "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES"

      clip_image002[9]
  4. Paste this folder and rename it to your chosen new name

    clip_image004[7]

 

Step 2 – Edit Setup Information File

  1. In your new theme folder, rename OLDNAME.INF file to NEWNAME.INF (Wheat to LewTek)
    1. – Ensure its upper case
  2. Open NEWNAME.INF with notepad or your favorite text editor (LEWTEK.INF)
  3. Change the value of title under [info] from Oldname to Newname.
  4. Change all values under [titles] from Oldname to Newname.

    clip_image006[7]

 

Step 3 – Edit SPTHEMES.XML

Next we need to edit this file so that we can actually choose our newly created theme. This will make it available in the list of themes on the Site Theme page.

clip_image008

  1. Open SPTHEMES.xml in notepad or any other text editor for editing. It is located in the following directory:
    • "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\SPTHEMES.XML"
  2. Next you need to add your new template. Add the following lines under the <SPThemes> tag (you may find it easier to just copy and paste the tags for an existing theme, and then changing it):

    <Templates>
         <TemplateID>LewTek</TemplateID>
         <DisplayName>LewTek</DisplayName>
         <Description>Type a description for your new theme.</Description>
         <Thumbnail>images/thlewtek.gif</Thumbnail>
         <Preview>images/thlewtek.gif</Preview>
    </Templates>

clip_image010

  1. The thumbnail and preview tag reference an image. This image does not exist yet and you’ll need to create it. Once your theme is complete, you can take a screenshot of it and then resize it.
    • This will be the preview image on the Site Theme page.
    • Ensure that the size of the image is 375 x 231 pixels.
    • Once you create the image, place it in the following directory:
      • "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\IMAGES"

        clip_image011
  2. Now if you navigate back to the Site Theme page and refresh it – you’ll see your custom theme available to apply to the site. You’re done!

    clip_image013

 

Edit Your Custom Theme

The good news is that you created a custom theme to apply to sites. The bad news? Well, it looks just like the old theme that you copied.
There are many ways to edit the theme that you have created, so I won’t go into much detail on that here. However, here are some tips and resources I recommend.


Theme Editing Tips

  • The file theme.css in your theme folder contains all of your styles
    • Edit this style sheet to make changes to your theme’s look – change the colors, change the font, etc...
  • Images in your theme folder can be edited / replaced.
  • After making any changes to your theme, reset IIS prior to reapplying the theme.
    • The theme is stored in the database when you apply it, so you must refresh.
    • You reset IIS by Start > Run: iisreset

      clip_image002[11]
  • Make incremental backups of your Theme folder as you are working. Somewhere along the way you WILL mess up and need to revert.


Theme Editing Resources

 

UPDATE 6.16.08: Here's a great solution for changing all of the fonts http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3476039&SiteID=17 

 

- Dan Lewis

 
Share It:          
 
 

Links to this post

Comments

mosessaur  commented on  Friday, December 19, 2008  11:47 PM 

Thank you Dan, I'm sure this will save me sometime in future when I need to do it.

Rita  commented on  Friday, December 19, 2008  11:48 PM 

Thanks Dan -- I'm starting to work on my custom theme now! Just printing out these steps! Maybe I'll share my finished results with you! R

ravi  commented on  Friday, December 19, 2008  11:48 PM 


Nice Dan..I will try to create new theam today.. let u know the result...

thankx in advance

ravi

Phil  commented on  Friday, December 19, 2008  11:49 PM 


I followed the instructions to the letter, was able to select the new theme in SharePoint under site settings, etc. but changes I make to the theme.css file are NOT reflected in the site. Am I missing a step?

I cleared the browser cache many times, but still looke as if I was looking at the original theme that was copied to form the basis for the new one. Any ideas???

Phil

Dan Lewis  commented on  Friday, December 19, 2008  11:49 PM 

Phil, are you resetting IIS? There's a tip at the end of the article about it.

1. Select a theme that isn't yours.

2. Reset IIS

3. Select your theme and apply it

Start > Run > iisreset

Phil Jackson  commented on  Friday, December 19, 2008  11:50 PM 


Dan,

selecting a different theme, iisreset, select my theme (maybe iisreset again?) seemed to do the trick. Though this is a test server, this certainly did inconvenience my co-worker, as I must have done iisreset a thousand times today as I learn my way around WSS 3.0 - is there any way to develop locally using SharePoint Designer & Windows XP?

Or would I have to actually have Windows Server 2003 on my machine?

(I was remoted in to our test WSS server working in text editor with

css file and looking at my testdefault.master page code in Sharepoint Designer on my other machine, having "opened site" to also look at the test WSS server so I could see what css classes were given to various parts.

thanks!!!

Phil J.

Joe Kennington  commented on  Friday, December 19, 2008  11:51 PM 


Thank for this post, it's help me out tremendously.

Just to pass on some of my experience creating a theme, I've used a virtual machine to thrash out stuff in a safe environment. It works really well and once I'd finished, I could just copy over the completed work to production server. Everything was running on my pc and it protected me from other work happening on the site. It also protects other from my mistakes ;-)

3Nokta  commented on  Friday, December 19, 2008  11:52 PM 

Thank you very much for info.

praveen  commented on  Friday, December 19, 2008  11:53 PM 

Thanx Dan........

Tim  commented on  Wednesday, January 07, 2009  7:31 AM 

Just what I'm looking for. I will be starting to redesign our Sharepoint in the next couple of weeks.

So I can edit the theme.css, but how do i edit the template? Is that in the master.template?

Where is that file?

Dan Lewis  commented on  Monday, January 19, 2009  3:38 PM 

Tim, the theme is just that, a theme. If you want to edit the layout of the site and the template itself, you'll need to create a new masterpage. Check out Heather's site for all sorts of information on branding. Heather Solomon: http://heathersolomon.com/blog/

Lars  commented on  Monday, March 16, 2009  10:36 AM 

hey,

i do this, how i can set the new theme to "default" theme.

so is creating a new workarea the new theme are used...

PLEASE!!!!

Dan Lewis  commented on  Monday, March 16, 2009  10:51 AM 

Lars, please see Ishai Sagi's post on how to do this: http://www.sharepoint-tips.com/2006/03/automatically-applying-theme-to-site.html

Paul  commented on  Tuesday, June 23, 2009  12:12 PM 

Dan,

When doing the development of a theme, perform the duplication steps and apply your new theme to the site.

Then open the site in SPD and browse to the _Themes/_YourNewTheme directory.

In here will be a direct copy of the theme.css called something like bubb1011-65001.css

If you edit this file, the css changes are immediate and don't require the theme to be reapplied, saving tons of time.

Once complete, copy the contents of this temporary file back into your theme.css in the theme directory on the filesystem in the 12 hive.

Itumeleng Ramothata  commented on  Wednesday, June 24, 2009  10:38 AM 

Dan,

Thanks, it has helped me tremendously.

I have created a few custom pages that I display however when I view them, the theme is not applied to them. Is there a way of applying the site theme to a custom application? How would I go about doing it?

harry  commented on  Wednesday, December 30, 2009  8:22 AM 

Hi,

This artical is very useful for me. I am a Share Point developer and always looking to

learn something new. I would like to introduce another good SharePoint blog, Have a look.

http://SharePointBank.com
Harry

Leave a comment





CAPTCHA Image Validation