SharePoint 2010 master page 控件介绍(1)

时间:2021-09-19 10:34:41

转:http://blog.csdn.net/lgm97/article/details/6409204

以下所有的内容都是根据Randy Drisgill (MVP SharePoint Server)的starter mater page for sharepoint 2010 中的注释写的。

参考:http://startermasterpages.codeplex.com/。所有内容是自己看的时候的笔记,以便记忆。

<!-- 机器人-->

<SharePoint:RobotsMetaTag runat="server"/>

<!-- 页面标题 - overridden by asp:content on pages or page layouts -->

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

<!-- 网页图标-->

<SharePoint:SPShortcutIcon runat="server" IconUrl="/Style Library/sitename/favicon.ico"/>

<!-- 所有自带的CSS -->

<SharePoint:CssLink runat="server" Version="4"/>

<SharePoint:Theme runat="server"/>

<!-- 页面控件与script和SharePoint Object model 交互 -->

<SharePoint:SPPageManager runat="server"/>

<!-- unified logging service -->

<SharePoint:ULSClientConfig runat="server"/>

<!-- 向脚本元素标识这是一个v4 mater page , required for scrolling? -->

<script type="text/javascript">

var _fV4UI = true;

</script>

<!-- 加载SharePoint  JS 脚本-->

<SharePoint:ScriptLink language="javascript" Defer="true" runat="server"/>

<style type="text/css">

/* fix scrolling on list pages */

#s4-bodyContainer {

position: relative;

}

/* hide body scrolling (SharePoint will handle) */

body {

height:100%;

overflow:hidden;

width:100%;

}

/* popout breadcrumb menu needs background color for firefox */

.s4-breadcrumb-menu {

background:#F2F2F2;

}

/* if you want to change the left nav width, change this and the margin-left in .s4-ca */

body #s4-leftpanel {

/* width:155px; */

}

/* body area normally has a white background */

.s4-ca {

background:transparent none repeat scroll 0 0;

/* margin-left:155px; */

}

</style>

<!-- 链接到自定义的CSS文件  -->

<SharePoint:CssRegistration name="/Style Library/sitename/style.css" After="corev4.css" runat="server"/>

<!-- 微软说这些应该一直在head标签内 -->

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

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

<!-- 处理SharePoint脚本 -->

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

<!-- 控制web part 和 web part zone -->

<WebPartPages:SPWebPartManager runat="server"/>