大家好,又见面了,我是你们的朋友全栈君。
自定义
Sharepoint MasterPage
页,共有
31
个
ContentPlaceHolder
占位符,一个也不能少因为在应用到网站或网页时,网站或网页要向
MasterPage
页里对应的
ContentPlaceHolder
里填入内容,若有的
ContentPlaceHolder
不需要则可以把它隐藏掉而不要将其删除。
<%@Master language=”C#”%>
<%@ Register Tagprefix=”SharePoint” Namespace=”Microsoft.SharePoint.WebControls” Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %> <%@ Register Tagprefix=”Utilities” Namespace=”Microsoft.SharePoint.Utilities” Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %> <%@ Import Namespace=”Microsoft.SharePoint” %>
<%@ Import Namespace=”Microsoft.SharePoint.ApplicationPages” %>
<%@ Register Tagprefix=”WebPartPages” Namespace=”Microsoft.SharePoint.WebPartPages” Assembly=”Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c” %>
<%@ Register TagPrefix=”wssuc” TagName=”Welcome” src=”~/_controltemplates/Welcome.ascx” %>
<%@ Register TagPrefix=”wssuc” TagName=”DesignModeConsole” src=”~/_controltemplates/DesignModeConsole.ascx” %>
<HTML dir=”<%$Resources:wss,multipages_direction_dir_value%>” runat=”server” xmlns:o=”urn:schemas-microsoft-com:office:office” __expr-val-dir=”ltr”>
<HEAD runat=”server”>
<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 runat=”server”/>
<Title ID=onetidTitle><asp:ContentPlaceHolder id=PlaceHolderPageTitle runat=”server”/></Title>
<SharePoint:CssLink runat=”server”/>
<SharePoint:Theme runat=”server”/>
<SharePoint:ScriptLink language=”javascript” name=”core.js” Defer=”true” runat=”server”/>
<SharePoint:CustomJSUrl runat=”server”/>
<SharePoint:SoapDiscoveryLink runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderAdditionalPageHead” runat=”server”/>
<SharePoint:DelegateControl runat=”server” ControlId=”AdditionalPageHead” AllowMultipleControls=”true”/>
<style type=”text/css”>
.style1 {
margin-right: 0px;
}
</style>
</HEAD>
<BODY scroll=”yes” οnlοad=”javascript:if (typeof(_spBodyOnLoadWrapper) != ‘undefined’) _spBodyOnLoadWrapper();”>
<form runat=”server” οnsubmit=”return _spFormOnSubmitWrapper();”>
<WebPartPages:SPWebPartManager id=”m” runat=”Server”/>
<!– 全局站点导航及站点地图 –>
<asp:ContentPlaceHolder id=”PlaceHolderGlobalNavigation” runat=”server”>
<asp:ContentPlaceHolder id=”PlaceHolderGlobalNavigationSiteMap” runat=”server”> </asp:ContentPlaceHolder>
</asp:ContentPlaceHolder>
<!– 搜索框 –>
<asp:ContentPlaceHolder id=”PlaceHolderSearchArea” runat=”server”>
</asp:ContentPlaceHolder>
<!– 站点名称 –>
<asp:ContentPlaceHolder id=”PlaceHolderSiteName” runat=”server”>
</asp:ContentPlaceHolder>
<!– 顶级水平导航菜单条 –>
<asp:ContentPlaceHolder id=”PlaceHolderTopNavBar” runat=”server”>
<!– 顶级水平导航菜单 –>
<asp:ContentPlaceHolder id=”PlaceHolderHorizontalNav” runat=”server”></asp:ContentPlaceHolder>
</asp:ContentPlaceHolder>
<!– 设计控制 –>
<asp:ContentPlaceHolder ID=”WSSDesignConsole” runat=”server”>
<wssuc:DesignModeConsole id=”IdDesignModeConsole” runat=”server”/>
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID=”SPNavigation” runat=”server”>
<SharePoint:DelegateControl runat=”server” ControlId=”PublishingConsole”
PrefixHtml=”<tr><td colspan="4" id="mpdmconsole" class="ms-consolemptablerow">”
SuffixHtml=”</td></tr>”>
</SharePoint:DelegateControl>
</asp:ContentPlaceHolder>
<!– 站点标题左侧的空格 –>
<asp:ContentPlaceHolder id=”PlaceHolderTitleLeftBorder” runat=”server”></asp:ContentPlaceHolder>
<!– 站点导航条 –>
<asp:ContentPlaceHolder id=”PlaceHolderTitleBreadcrumb” runat=”server”>
<!– 设置当前网站的导航 –>
<asp:SiteMapPath SiteMapProvider=”SPContentMapProvider” id=”ContentMap” SkipLinkText=”” NodeStyle-CssClass=”ms-sitemapdirectional” runat=”server”/>
<!– 设置当前站点的导航
<asp:SiteMapPath SiteMapProvider=”SPSiteMapProvider” id=”ContentMap” SkipLinkText=”” NodeStyle-CssClass=”ms-sitemapdirectional” runat=”server”/>
–>
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderPageTitleInTitleArea” runat=”server” />
<asp:ContentPlaceHolder id=”PlaceHolderMiniConsole” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderTitleRightMargin” runat=”server”></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderTitleAreaSeparator” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderLeftNavBarDataSource” runat=”server” />
<asp:ContentPlaceHolder id=”PlaceHolderCalendarNavigator” runat=”server” />
<asp:ContentPlaceHolder id=”PlaceHolderLeftNavBarTop” runat=”server”/>
<!– 左侧导航栏 –>
<asp:ContentPlaceHolder id=”PlaceHolderLeftNavBar” runat=”server”>
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderLeftActions” runat=”server”></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderNavSpacer” runat=”server”></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderLeftNavBarBorder” runat=”server”></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderBodyLeftBorder” runat=”server”></asp:ContentPlaceHolder>
<!– 这个要添加,因为若不加这标签则Webpart的编辑工具栏则会显示在网页的下面,从而使整个网站的结构乱掉 –>
<PlaceHolder id=”MSO_ContentDiv” runat=”server”>
<!– 网页描述信息 –>
<asp:ContentPlaceHolder id=”PlaceHolderPageDescription” runat=”server”/>
<!– 站点内容的主要内容信息 –>
<asp:ContentPlaceHolder id=”PlaceHolderMain” runat=”server”>
</asp:ContentPlaceHolder>
</PlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderBodyRightMargin” runat=”server”></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id=”PlaceHolderFormDigest” runat=”server”>
<SharePoint:FormDigest runat=server/>
</asp:ContentPlaceHolder>
<input type=”text” name=”__spDummyText1″ style=”display:none;” size=1/>
<input type=”text” name=”__spDummyText2″ style=”display:none;” size=1/>
</form>
<asp:ContentPlaceHolder id=”PlaceHolderUtilityContent” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderBodyAreaClass” runat=”server”/>
<asp:ContentPlaceHolder id=”PlaceHolderTitleAreaClass” runat=”server”/>
</BODY>
</HTML>
转载于:https://www.cnblogs.com/netcai/archive/2009/09/16/1567385.html
发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/159859.html原文链接:https://javaforall.cn
【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛
【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...