Wednesday, October 10, 2012

MasterPageFile Reference

On top of the page there is a line where the master page can be defined manually, or to be the default and custom master page:
<%@ Page language="C#" MasterPageFile=  ../_catalogs/masterpage/<Master Page File Name>.master meta:progid="SharePoint.WebPartPage.Document" inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" meta:webpartpageexpansion="full" %>

MasterPageFile Value
Definition
MasterPageFile="~masterurl/custom.master"

Dynamic custom master page defined in the “Site Settings -> Look and Feel -> Master Page” section.
MasterPageFile="~masterurl/default.master"

Defines the master page according to the page layout. On OOTB page layout, the master page will be v4.master for example.
MasterPageFile="../_catalogs/masterpage/Master.master"

Static specific master page definition.

No comments:

Post a Comment