Export (0) Print
Expand All

NavBarLink Element (Site)

Last modified: July 15, 2011

Applies to: SharePoint Foundation 2013 | SharePoint Server 2013

In this article
Attributes
Child Elements
Parent Elements
Occurrences

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


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

Attribute

Description

Name

Required Text. Contains the text displayed for the hyperlink.

Url

Required Text. Contains the URL for the hyperlink.

Minimum: 0

Maximum: Unbounded

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>
Show:
© 2014 Microsoft