views:

1104

answers:

1

Sometimes I love MOSS 2007, and sometimes I want to throw it right out the window. This is one of those times it should go out the window.

Im trying to come up with an easy way for a designer to update a WSS 3.0 Theme for our site. This theme is used by every site in the site collection. The following is not designer friendly (specifically step 4) as a way to update the theme...

  1. Designer makes edits to theme.css and copies it to production
  2. Change selected theme to any other theme in site settings
  3. Perform an IISRESET
  4. Re-Apply the theme in site settings

Keep in mind Themes are not inherited by subsites. Also, many times the above doesnt suffice and you also have to update the theme.inf file to increment the "version" and "format" below.

[info]
title=ThemeName
codepage=65001
version=3.10
format=3.10
readonly=true
refcount=0

Now, I have tried including into our Branding feature (which sets the masterpages and sets the theme for new sites) the ability to reset the theme. But, this doesn't really work (using an asp button to set to Wheat and another button to set it back to the custom theme). It doesn't work probably because it's not restarting IIS and updating the version numbers in the mentioned theme.inf above.

    for (int x = 0; x < SPContext.Current.Site.AllWebs.Count; x++)
    {
        using (SPWeb site = SPContext.Current.Site.AllWebs[x])
        {
            site.ApplyTheme(themeName);
            site.Update();
        }
    }

So... Have you provided a solution for your designers as a way to update/reset a Theme? If so, what was your solution? Your answer should NOT be Heathers solution, which is NOT scalable in a Farm.

+1  A: 

I never bother with themes. They are just a pain. Our designers create a custom css, masterpages and page layouts. Custom images can go in the style library or 12-hive. Changes are instantaneous to all subsites since they all reference the artifacts from the root site.

if it -has- to be a theme it is still easier to develop it as a custom css and build it into a theme later.

You can edit themes directly in designer. Upon applying a theme it is copied into the site where you can change it and see the result immediately. Don't forget to copy it out again though.

ArjanP
Many do bother with themes, especially for Intranets where they want a branded skin. Obviously for publicy facing sites it's wise to go the route you did, wich we did for our public facing site. So, still looking for an answer here.
Marc
You can still 'build' your theme using a custom css. Only when it is done you would have to go the route you've sketched above.Heathers solution could be made to scale if only you reference your theme css files from the root /Style Library instead of _layouts?
ArjanP
Also if the manual steps are cumbersome you can script the update process.. using this for instance: http://stsadm.blogspot.com/2008/01/apply-theme.htmlYou still have to wait a long time before the process is finished you at least don't have to do all that clicking.
ArjanP