There are, however, two additional tokens, the site-collection and site relative ~sitecollection/<central master page> and ~site/<local master page> static tokens from Windows SharePoint Services 3.
You can still use these static tokens in SharePoint 2010 as shown in this example:
<%@ Page language="C#" MasterPageFile="~site/_catalogs/masterpage/JBV/SiteCenterMasterPage.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %>
Note how you must specify the site-collection or site relative path of the master page file location in addition to the name of the master page file.
So using the static tokens works like a breeze for web part pages in SharePoint 2010 also. I haven't tested if the Publishing feature's page layouts still are limited to the dynamic tokens. For application pages the ability to use a customized master page is new in SharePoint 2010.
1 comment:
This worked for me, thanks. I was used to ASP.NET master pages, and I was almost sure this could be done in SharePoint 2010, but did not know the correct paths.
We used it to create an IE10-compatible master page to apply to single pages for script compatibility. Hardly ideal, but it was expedient in the circumstances.
Post a Comment