Compartilhar via


NavBarLink Element

The NavBarLink element defines a hyperlink used in the top navigation area of a home page.

Syntax

<NavBarLink>
  Name = "Text"
  Url = "Text"
</NavBarLink>

Attributes

Name Description
Name Required Text. Contains the text displayed for the hyperlink.
Url Required Text. Contains the URL for the hyperlink.

Element Relationships

Parent Elements
NavBar

Example

The following example specifies the links for the top navigation area of a home page.

<NavBar Name="SharePoint Top Navbar" Separator="&nbsp;&nbsp;&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>