Sharepoint的空白master page 模板

时间:2021-12-01 14:57:52

有的时候我们需要在sharepoint中创建完全空白的master page,这种master page的特点是页面内容完全空白,包括所有导航和菜单都没有,但是具有sharepoint的内置功能,比如权限认证,可以添加web part zone等等。

以下是一个模板,可以直接使用。这里面保留了一些多余的节点,比如SharePoint:SoapDiscoveryLink,这些节点可能暂时没用,但是用到时改一下就行了,不用的话可以删掉。

<%@ Master Language="C#" %>

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>

<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html id="Html1" lang="<%$Resources:wss,language_value%>" xmlns:o="urn:schemas-microsoft-com:office:office" runat="server" dir="<%$Resources:wss,multipages_direction_dir_value%>">

<head id="Head1" runat="server">

    <meta http-equiv="X-UA-Compatible" content="IE=8"/>

    <meta name="GENERATOR" content="Microsoft SharePoint"/>

    <meta name="progid" content="SharePoint.WebPartPage.Document"/>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <meta http-equiv="Expires" content="0"/>

    <SharePoint:RobotsMetaTag ID="RobotsMetaTag1" runat="server"/>

    <title id="onetidTitle"><asp:ContentPlaceHolder id="PlaceHolderPageTitle" runat="server"/></title>

    <SharePoint:CssLink ID="CssLink1" runat="server" Alternate="true"/>

    <SharePoint:Theme ID="Theme1" runat="server"/>

    <SharePoint:CssRegistration ID="CssRegistration1" Name="minimalv4.css" runat="server" />

    <SharePoint:ULSClientConfig ID="ULSClientConfig1" runat="server"/>

    <SharePoint:ScriptLink ID="ScriptLink1" language="javascript" name="core.js" OnDemand="true" runat="server" />

    <SharePoint:CustomJSUrl ID="CustomJSUrl1" runat="server" />

    <SharePoint:SoapDiscoveryLink ID="SoapDiscoveryLink1" runat="server" />

    <asp:ContentPlaceHolder id="PlaceHolderAdditionalPageHead" runat="server"/>

    <SharePoint:DelegateControl ID="DelegateControl1" runat="server" ControlId="AdditionalPageHead" AllowMultipleControls="true"/>

    <SharePoint:SPShortcutIcon ID="SPShortcutIcon1" runat="server" IconUrl="/_layouts/images/favicon.ico" />

    <SharePoint:SPHelpPageComponent ID="SPHelpPageComponent1" Visible="false" runat="server" />

</head>

<body onload="javascript:if (typeof(_spBodyOnLoadWrapper) != 'undefined') _spBodyOnLoadWrapper();">

    <form id="Form1" runat="server" onsubmit="if (typeof(_spFormOnSubmitWrapper) != 'undefined') {return _spFormOnSubmitWrapper();} else {return true;}">

    <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />

    <WebPartPages:SPWebPartManager id="m" runat="Server" />

    <SharePoint:FormDigest ID="FormDigest1" runat="server"/>

 

    <div id="maincontent" class="s4-pr">

        <asp:ContentPlaceHolder id="PlaceHolderMain" runat="server" />

    </div>

    <div style="display:none;">

        <asp:ContentPlaceHolder id="PlaceHolderLeftNavBar" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderBodyLeftBorder" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderPageImage" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderTitleLeftBorder" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server" />

        <asp:ContentPlaceHolder id="PlaceHolderTitleAreaSeparator" runat="server" />

    </div>

 

    </form>

</body>

</html>