NavBarLink Element (Site)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Defines a hyperlink used in the top navigation area of a home page.

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

Attributes

Attribute

Description

Name

Required Text. Contains the text displayed for the hyperlink.

Url

Required Text. Contains the URL for the hyperlink.

Child Elements

None

Parent Elements

NavBar

Occurrences

Minimum: 0

Maximum: Unbounded

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>