Compartilhar via


Elemento NavBars (Site)

Aplica-se a: SharePoint 2016 | SharePoint Foundation 2013 | | do SharePoint Online SharePoint Server 2013

Contém a coleção de links que aparecem nas áreas de navegação superior e esquerda de uma home page.

<NavBars>
</NavBars>

Elementos e atributos

As seções a seguir descrevem os atributos, os elementos filhos e os elementos pai.

Atributos

Nenhuma

Elementos filho

Elementos pai

Occurrences

  • Mínimo: 0
  • Máximo: 1

Exemplo

O exemplo a seguir do Onet.xml de arquivo define as áreas de navegação padrão para a página inicial.

<NavBars>
   <NavBar Name="SharePoint Top Navbar" Separator="&amp;nbsp;&amp;nbsp;&amp;nbsp;"
      Body="<a ID='onettopnavbar#LABEL_ID#' href='#URL#'
         accesskey='J'>#LABEL#</a>" ID="1002">
      <NavBarLink Name="Documents and Lists"
         Url="_layouts/[%=System.Threading.Thread.CurrentThread.
            CurrentUICulture.LCID%]/viewlsts.aspx" />
      <NavBarLink Name="Create"
         Url="_layouts/[%=System.Threading.Thread.CurrentThread.
            CurrentUICulture.LCID%]/create.aspx" />
      <NavBarLink Name="Site Settings"
         Url="_layouts/[%=System.Threading.Thread.CurrentThread.
            CurrentUICulture.LCID%]/settings.aspx" />
      <NavBarLink Name="Help" Url="javascript:HelpWindowKey
         ("helphome")" />
   </NavBar>
   <NavBar Name="Documents" Prefix="<table border=0 cellpadding=4
         cellspacing=0>"
      Body="<tr><td><table border=0 cellpadding=0
         cellspacing=0><tr><td>
      <img src='/_layouts/images/blank.gif' ID='100' alt='Icon'
         border=0>&amp;nbsp;</td><td valign=top>
      <a ID=onetleftnavbar#LABEL_ID#
         href='#URL#'>#LABEL#</td></tr></table></td></tr>"
      Suffix="</table>" ID="1004" />
   <NavBar Name="Pictures" Prefix="<table border=0 cellpadding=4
         cellspacing=0>"
      Body="<tr><td><table border=0 cellpadding=0
         cellspacing=0><tr><td>
      <img src='/_layouts/images/blank.gif' ID='100' alt='Icon'
         border=0>&amp;nbsp;</td>
      <td valign=top><a ID=onetleftnavbar#LABEL_ID#
         href='#URL#'>#LABEL#</td></tr></table>
      </td></tr>" Suffix="</table>" ID="1005" />
   <NavBar Name="Lists" Prefix="<table border=0 cellpadding=4
         cellspacing=0>"
      Body="<tr><td><table border=0 cellpadding=0
         cellspacing=0><tr><td>
      <img src='/_layouts/images/blank.gif' ID='100' alt='Icon'
         border=0>&amp;nbsp;</td>
      <td valign=top><a ID=onetleftnavbar#LABEL_ID#
         href='#URL#'>#LABEL#</td></tr></table>
      </td></tr>" Suffix="</table>" ID="1003" />
   <NavBar Name="Discussions" Prefix="<table border=0 cellpadding=4
         cellspacing=0>"
      Body="<tr><td><table border=0 cellpadding=0
         cellspacing=0><tr><td>
      <img src='/_layouts/images/blank.gif' ID='100' alt='Icon'
         border=0>&amp;nbsp;</td>
      <td valign=top><a ID=onetleftnavbar#LABEL_ID#
         href='#URL#'>#LABEL#</td></tr></table>
      </td></tr>" Suffix="</table>" ID="1006" />
   <NavBar Name="Surveys" Prefix="<table border=0 cellpadding=4
         cellspacing=0>"
      Body="<tr><td><table border=0 cellpadding=0
         cellspacing=0><tr><td>
      <img src='/_layouts/images/blank.gif' ID='100' alt='Icon'
         border=0>&amp;nbsp;</td>
      <td valign=top><a ID=onetleftnavbar#LABEL_ID#
         href='#URL#'>#LABEL#</td></tr></table>
      </td></tr>" Suffix="</table>" ID="1007" />
</NavBars>