Welcome to MSDN Blogs Sign in | Join | Help

Michael Yeager's MSDN Blog

A stigmergic trail of SharePoint, asp.net and Silverlight Solutions
Customizing the application.master in SharePoint 2007

The good news is that the application.master in SharePoint 2007 is the master page for all of the SharePoint administration pages located in the _layouts directory.

When you create a new look and feel for your SharePoint installation by creating a new master page and uploading it into your master page gallery, this will only change the content pages in your portal, the administrative pages will retain the out of the box look and feel. To incorporate your new look and feel into your administration pages, all you have to do is implement your own custom version of application.master located in the 12/TEMPLATE/LAYOUTS directory.

The bad news is that modifying the application.master in the TEMPLATE/LAYOUTS directory is not recommended and in fact will result in an unsupported SharePoint installation.

For info on customizations that are supported and unsupported take a look at: 

 http://support.microsoft.com/default.aspx?scid=kb;en-us;898631

Right now there doesn't appear to be any recommended "best practice" to implement a custom application.master. If someone has found a "best practice" for this issue, let me know, otherwise perhaps the following will serve as the emerging basis for one.

 Copy the entire TEMPLATE/LAYOUTS folder into the TEMPLATE folder again, and rename this new vewsion "LAYOUTS<WEBAPPNAME>" where <WEBAPPNAME> is replaced by the name of your Web Application in capitals with no spaces e.g.: LAYOUTSSP80.

 Go into IIS and right click on the _layouts virtual directory under that particular web application, select Properties, and use the Browse button to change the "local path" from LAYOUTS to your new LAYOUTS<WEBAPPNAME> directory.

 You'll now find that everything works just as before, but now you can go into the LAYOUTS<WEBAPPNAME> directory and modify the application.master without endangering the out of the box original or your SharePoint support agreement.

 This technique was developed and used by many SharePoint installations running SPS 2003 and it seems that SharePoint developers have broadly decided to continue this practice with SharePoint 2007. I know it seems strange to copy some hundred plus files simply to change a single file, but that appears to be the best way to do it for now...

There are two advantages to this technique:

  1. you can repeat this process for each of the web applications on the web server and in your web farm such that each web application (Portal) can have it's own complete look and feel - including the _layout pages
  2. you can revert back to the default SharePoint configuration by simply repointing the virtual server at the Layouts directory - this can be important if you have issues requiring Microsoft support

There is one big dis-advantage to this technique: In the event that an update changes files in the layouts directory, the files in your LAYOUTS<WEBAPPNAME> folder will not be updated...

Posted: Thursday, July 05, 2007 9:52 AM by mty
Filed under: , ,

Comments

Jennifer Davis said:

Thank you for this article! I am in a time crunch with a MOSS rollout and your article has just been a lifesaver for me!

# August 3, 2007 6:24 PM

Sridhar's Blog said:

It's unfortunate, the customization ability offered by MOSS 2007 w.r.t. playing around with application

# September 5, 2007 2:16 AM

Kain Balzary said:

The styles sheet override however will apply on application.master, so they can be styled and themed, though only within the complex and limiting options the table heavy master page layout allows.

# September 9, 2007 8:49 PM

Naz said:

Hey, Thank you very much. This work around has really given me sigh of relief :)

# April 29, 2008 3:13 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker