Master Page and Themes on WSS sites in MOSS

I was in a meeting the other day showing off master pages on a "team" site on our MOSS farm and discovered a few things... The steps below should work with any of the master pages and themes. Feel free to substitute. The steps below are great for IWs or IT Pro's or whoever is trying to change the look and feel of your site. This is a walk thorugh of my experience trying to brand a simple team site and change it from MS Blue.

Let’s call this How to hide the MS blue...

Applying a Site Master

Retracing my steps...

  1. Create a "team" site (team template)
  2. In site settings, go to site collection features and activate the "Office SharePoint Server Publishing Infrastructure" feature
  3. Under Look and feel in site settings, go to Master Page
  4. for Site Master page choose BlackVertical.master (check the box to apply to sub sites)

Expected result... go to home page and I'd see a fancy site with the black sides (no MS blue right?)

Wrong. Apparently the Site Master applies to publishing pages only (works for Intranet or Internet Portal Templates, but you'll discover it doesn't apply to sub sites with WSS templates)

Applying a System Master

5. Go back to site settings, Master Page, and for System.Master page choose BlackVerticle.Master (check the box to apply to sub sites)

  1. Site Settings looks MS blue
  2. Go to home page.
  3. WooHoo now we have the new master page... ,

Wait the bars on the web parts are MS blue...

9. Go to site settings, under look and feel choose Site themes and choose Obsidian. Click apply.

10. Site settings, now looks like the black obsidian theme, but going to the home page or any list still has the blue web part bar.

So, how do we solve that?

Applying a Custom CSS (from a theme)

11. Go to site settings, click view source, you'll see the reference to the theme in the style sheet just a few lines down... Look for:

12. Copy the href URL path of the css reference (minus the querystring): /sites/tr5iw/_themes/Obsidian/Obsi1011-65001.css

13. Go to Master Page, scroll to the bottom, choose Specify a CSS file to be used and put in the URL to the CSS. "/sites/tr5iw/_themes/Obsidian/Obsi1011-65001.css" check the box to apply to sub sites and “click Apply”

14. Go to homepage

15. We did it. No blue.

Finish… Without opening any tools our UI in our team site has a consistent theme across site settings, the homepage and list pages.

So what did we learn? There is a difference between site.master and system.master in relation to the pages and templates.

Site Master: The site master page will be used by all publishing pages. (That’s great for the Internet and Intranet publishing site, but not for many of the subsites)

System Master: Use the system master page for all forms and view pages in this site. (let me amend this with these are all the site templates and pages that the site master does not apply to, including team sites, document workspaces, web part pages, and all non publishing pages.

MSDN has some good content on modifying master pages:

Master Pages

Customizing Master Pages in Windows SharePoint Services

SharePoint Designer on Office Online has some good info as well

Introduction to ASP.NET Master pages

Looking for more than out of the box ones? Here are some sample master pages.

Heather Solomon [MVP] is one of the best and has some great posts on modifying master pages including a good base master page to start from scratch.

source:blogs.msdn.com

0 nhận xét:

Post a Comment

thanks comment