NavBarPage 元素(网站)

上次修改时间: 2015年3月9日

适用范围: SharePoint Foundation 2010

本文内容
属性
子元素
父元素
出现次数

提供有关指定作为模块中的主页的文件的信息,以便可将其他页链接到该页。

<NavBarPage
  ID = "Integer"
  Name = "Text"
  Position = "Text">
</NavBarPage>

属性

属性

说明

ID

必需属性,类型为 Integer。指定页的 ID。

Name

必需属性,类型为 Text。指定在链接到该页的其他页的导航区域中出现的文本。

Position

可选属性,类型为 Text。指定由 NavBarPage 元素表示的 UI 元素相对于页的顶部导航区域所在的位置。可能的值包括:

  • Start — 在顶部导航区域的开头(用英文 left/top 表示)添加节点。

  • End — 在顶部导航区域的末尾(用英文 right/bottom 表示)添加节点。默认值。

  • 1001 和 2000 之间的数字 — 在其 ID 与指定值匹配的另一个 NavBarPage 元素之后(用英文 right/below 表示)添加节点。

子元素

父元素

File

出现次数

最小值:0

最大值:无限制

示例

下面的示例使用 NavBarPage 元素来指定有关模块中的主页的信息。

<Module Name="Default" Url="" Path="">
  <File Url="default.aspx" NavBarHome="True">
    <View List="$Resources:core,lists_Folder;/$Resources:core,announce_Folder;" BaseViewID="0" WebPartZoneID="Left" />
    <View List="$Resources:core,lists_Folder;/$Resources:core,calendar_Folder;" BaseViewID="0" RecurrenceRowset="TRUE" WebPartZoneID="Left" WebPartOrder="2" />
    <AllUsersWebPart WebPartZoneID="Right" WebPartOrder="1"><![CDATA[
      <WebPart xmlns="https://schemas.microsoft.com/WebPart/v2" xmlns:iwp="https://schemas.microsoft.com/WebPart/v2/Image">
        <Assembly>Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c</Assembly>
         <TypeName>Microsoft.SharePoint.WebPartPages.ImageWebPart</TypeName>
         <FrameType>None</FrameType>
         <Title>$Resources:wp_SiteImage;</Title>
         <iwp:ImageLink>/_layouts/images/homepage.gif</iwp:ImageLink>
       </WebPart>]]>
    </AllUsersWebPart>
    <View List="$Resources:core,lists_Folder;/$Resources:core,links_Folder;" BaseViewID="0" WebPartZoneID="Right" WebPartOrder="2" />
    <NavBarPage Name="$Resources:core,nav_Home;" ID="1002" Position="Start" />
    <NavBarPage Name="$Resources:core,nav_Home;" ID="0" Position="Start" />
  </File>
</Module>

请参阅

引用

Module