What should you do?

You have a SharePoint site. The current master page of the site is v4.master.

You create a custom master page named MyMasterPage.master.

You deploy the master page to /_catalogs/masterpage/.

You need to apply the custom master page to only the content pages of the site.

What should you do?

You have a SharePoint site. The current master page of the site is v4.master.

You create a custom master page named MyMasterPage.master.

You deploy the master page to /_catalogs/masterpage/.

You need to apply the custom master page to only the content pages of the site.

What should you do?

A.
Rename the custom master page as v4.master and overwrite /_catalogs/masterpage/v4.master.

B.
Rename the custom master page as v4.master and overwrite \14\TEMPLATE\GLOBAL\v4.master.

C.
Set the MasterUrl property and CustomMasterUrl property of the site to /_catalogs/masterpage/MyMasterPage.master.

D.
In the @Page directive of each page layout, set the MasterPageFile attribute to /_catalogs/masterpage/MyMasterPage.master.

Explanation:
MNEMONIC RULE: “MasterUrl and CustomMasterUrl”

At runtime, the value in this property replaces the ~masterurl/default.master token in content pages.

SPWeb.MasterUrl Property
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.masterurl.aspx

At runtime, the value in this property replaces the ~masterurl/custom.master token in content pages.

SPWeb.CustomMasterUrl Property
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.custommasterurl.aspx



Leave a Reply 0

Your email address will not be published. Required fields are marked *