Using a Page Specific Master Page in SharePoint 2010

If you’ve ever needed to change the master page of a specific page in a library, this technique is for you.  For example, if you have a page in the /SitePages/ library, and you wanted to assign a single page to a specific master page, all you have to do is change that pages’ “MasterPageFile” property, and you’ll be on your way.

This is all described well in the article below, so I’ll leave the details to that.

I did want to add however, that you cannot (of course) change a specific page in the /Pages/ library, because those are publishing pages, and are all controlled using page layouts (which do not allow for this kind of specific customization).  Just a note that was missing from the article above.

A quick example of how I used the suggested technique was to assign a specific page in my SitePages library to the v4.master page (below).


<%@ Page Language=”C#” Inherits=”Microsoft.SharePoint.WebPartPages.WikiEditPage” MasterPageFile=”~masterurl/default.master” meta:webpartpageexpansion=”full” meta:progid=”SharePoint.WebPartPage.Document” %>


<%@ Page Language=”C#” Inherits=”Microsoft.SharePoint.WebPartPages.WikiEditPage” MasterPageFile=”~site/_catalogs/masterpage/v4.master” meta:webpartpageexpansion=”full” meta:progid=”SharePoint.WebPartPage.Document” %>

The blue text above could have been any master page in the library, including any custom master pages that may have been created/added.


2 responses to “Using a Page Specific Master Page in SharePoint 2010

  1. This is nice one.. How can we change the master page of a single page in a BI template. I have a page in ~/pages/login.aspx… under BI template…

Comments are closed.