Condividi tramite


NavBarLink Element (Site)

Applies to: SharePoint Foundation 2010

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>