Horizontal and Vertical Menus

When you first create a site structure that includes a root or top-level site, more than one Web site, and pages and additional sites that are children of the top-level site, Office SharePoint Server 2007 creates two menus: a horizontal (top) menu, and a vertical (left) menu.
Horizontal and vertical menus are declared in master page markup. The following example declares a horizontal menu.

<SharePoint:AspMenu ID=”GlobalNav” Runat=”server” DataSourceID=”GlobalNavDataSource” Orientation=”Horizontal” StaticDisplayLevels=”1″ MaximumDynamicDisplayLevels=”1″/>

The vertical menu is declared similarly, but uses different properties from the horizontal menu. These properties are identical to those available on the ASP.NET 2.0 Menu control.

The following are the properties included by default in master page markup for both horizontal and vertical menus:

  1. DataSourceID – Specifies the data source control that provides the hierarchical data for this menu. In the previous example code, the DataSourceID points to a control with the ID “GlobalNavDataSource”.
  2. Orientation – Specifies whether the menu is horizontal or vertical.
  3. StaticDisplayLevels – Specifies the number of hierarchy levels to show in the menu at the same time.
  4. MaximumDynamicDisplayLevels – Specifies the number of levels to show in dynamic fly-out menus.

Cheers…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s