TopMenuItem Element
The TopMenuItem element is used to define the elements on the default top link bar of the SharePoint team Web site.
Syntax
<TopMenuItem
DisplayName = "Text"
Name = "Text"
Replace = "Text"
Url = "URL">
</TopMenuItem>
Attributes
Name | Description |
---|---|
DisplayName | Required Text. Specifies the text displayed on the navigation bar. |
Name | Required Text. Specifies the internal name for the item. |
Replace | Optional Text. Specifies a new window for the target item. |
Url | Required URL. Specifies the path to the target item. |
Related Elements
Parent Elements |
---|
TopMenuItems |
Example
The following excerpt is from the opening of ONET.XML. The user can edit this file to create different links on the top of every page on a SharePoint team Web site.
<TopMenuItems>
<TopMenuItem Name="Home" DisplayName="Home" Url="_layouts/default.htm"></TopMenuItem>
<TopMenuItem Name="Documents" DisplayName="Documents" Url="_layouts/AllLibs.htm">
</TopMenuItem>
<TopMenuItem Name="Discussions" DisplayName="Discussion Boards" Url="_layouts/discusns.htm"></TopMenuItem>
<TopMenuItem Name="Lists" DisplayName="Lists" Url="_layouts/viewlsts.htm"></TopMenuItem>
<TopMenuItem Name="Create" DisplayName="Create" Url="_layouts/create.htm"></TopMenuItem>
<TopMenuItem Name="SiteSettings" DisplayName="Site Settings" Url="_layouts/settings.htm"></TopMenuItem>
<TopMenuItem Name="Help" DisplayName="Help" Url="javascript:HelpWindow" Replace="javascript:HelpWindow">
</TopMenuItem>
</TopMenuItems>