Skip to main content

Thinking out aloud - Dave Hunter's SharePoint Blog

Go Search
Home
Blog
  

Locations of visitors to this page


 Useful Links

  Microsoft UK events
  SharePoint 2007 on CodePlex
  SharePoint Community Portal
  SharePoint User Group
  SharePoint Community Portal
  SharePoint Pedia
  SharePoint MSDN Forums
  SharePoint University
Home > Thinking out aloud - Dave Hunter's SharePoint Blog > Posts > Branding SharePoint Error Pages
My thoughts and findings on Microsoft Information worker technologies, including MCMS and SharePoint 2007 (MOSS).
Branding SharePoint Error Pages
Before Christmas I wrote an article about consistent branding.  This used the AlternateCssUrl property of a SPWeb.  You can also set this using the administration pages or via code using a SPFeatureReceiver.
 
 
Using this technique applies branding to SharePoint front end and back end pages, but didn't affect SharePoint's error page.  The error page uses Simple.master.  Simple.master can be located in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\.
 
After some investigation I noticed the Alternate Property of the CssLink control.  If this is set to true the Alternate CSS is also applied to pages using the Simple.master, like the error.aspx.
 
Technique to modifying layouts pages
 
I chose to copy the files within layouts to a sub folder and then modify the copied files.  This also requires you to modify the web application's "_layouts" virtual directory, but on a positive it doesn't affect the entire farm.  The process is detailed here "Customising application pages in the Layouts folder (I chose method 2)" http://support.microsoft.com/default.aspx/kb/944105/en-us
 
Changes to Simple.master
 
Change <SharePoint:CssLink runat="server" Alternate="false"/>
 
To <SharePoint:CssLink runat="server" Alternate="true"/>
 
The error pages now picks up the CSS specified in the AlternateCssUrl property.  Surely this would of made sense to be set by default ... never mind :)
 
Before ...
 
After ...
  Copyright
This work is licenced under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 UK: England & Wales License
  Site Map

Comments

There are no comments yet for this post.

 Dave Hunter

I'm currently a Senior Consultant at Netstore 2e2. I specialise in Microsoft Information Worker technologies (especially MOSS, MCMS and .NET), with over 8 years of experience within this area of specialism. 

I have gained two certifications for MOSS and WSS and look to complete the full certification track soon.

View Dave Hunter's profile on LinkedIn

  Subscribe in a reader


 Latest Posts

I’m attending the first ever SharePoint Saturday in the UK31/08/2010 19:43
I’ve re-joined CIBER UK31/08/2010 19:26
I’ve been Awarded a MVP for SharePoint01/04/2010 19:49
SharePoint 2010 Training on Microsoft E-Learning15/03/2010 17:56
SharePoint UK User Group - Thursday 27th August London Meeting25/08/2009 17:56
CAML Query that filters on the current user23/07/2009 17:50
Microsoft Ramp Up Free SharePoint Developer Training22/07/2009 20:59
How To: Change a SharePoint Application Pool Programmatically07/07/2009 18:08
SharePoint Forums Topping 100 Answers06/07/2009 12:29
Find out the SharePoint Internal Name for a Column or Site Column28/05/2009 09:56
1 - 10 Next