Export (0) Print
Expand All

Modifying Navigation Settings Through the UI

SharePoint 2007

You can configure navigation options on the Navigation Settings page in the Office SharePoint Server 2007 UI. You can access this page through either the Site Actions menu or from the Site Settings page.

To provide data to Office SharePoint Server 2007 sites, PortalSiteMapNodeProvider objects examine inheritance settings and other navigation properties defined for a site. The following table lists options that are available on the Navigation Settings page, identifies the corresponding classes and properties, and describes the effects of setting each option.

Navigation Option Description

Show subsites

Controls whether subsites are included automatically in navigation

Show pages

Controls whether pages are included automatically in navigation

Sort automatically

Arranges navigation items by using specified sorting criteria.

You can use the sorting pane to move navigation items from one heading to another.

Sort manually

Enables use of the sorting pane to rearrange navigation items.

Sort pages automatically

Enables use of the sorting pane to rearrange all navigation items except pages. Office SharePoint Server 2007 arranges page items by using the specified sorting criteria, though you can use the sorting pane to move pages from one heading to another.

Display the same navigation items as the parent site (Global)

Indicates the default setting for sites that are not top-level sites.

Indicates that the site should use (inherit) the global navigation items that the parent site uses.

Display the navigation items below the current site (Global)

Indicates that the site's global navigation items should be populated by items below the site.

Display the same navigation items as the parent site (Current)

Specifies that current navigation does not inherit parent site navigation by default.

For a given site, selecting this option usually causes the data source to start with the current site's immediate parent site, or one level up in the site hierarchy.

Display the current site, the navigation items below the current site, and the current site's siblings (Current)

Indicates that the data source starts with the current site's immediate parent site, or exactly one level up in the site hierarchy. It includes the current site and the site's siblings, but trims out children of the sibling nodes.

Display only the navigation items below the current site

Indicates that the site's current navigation items should be populated only by items below the current site.

Navigation Editing and Sorting

Use this section to rearrange any subsites, pages, and headings belonging to the site.

You can group links, subsites, and pages under headings. You can link headings to target URIs or leave them unlinked.

Global and Current Navigation Settings

The Global Navigation and Current Navigation settings sections include options that affect where in the site hierarchy the data source starts when visiting a given site.

In most cases, the default settings cause global navigation to inherit from the top-level site, which obviously cannot inherit. Changing the Global Navigation setting for a site somewhere deeper in the site hierarchy causes Office SharePoint Server 2007 to re-anchor global navigation for that site and for any sites beneath it. Even if the StartFromCurrentNode property is set to true, the Office SharePoint Server 2007 data source navigates up the site hierarchy from the current node until it finds a site that does not inherit, and it starts there instead.

In contrast, Current Navigation does not inherit by default and usually starts at the current node.

NoteNote:

When viewing the Navigation Settings page for the top-level site, the UI does not include the Global Navigation and Current Navigation sections. The top-level site has no parent navigation from which to inherit navigation items, and therefore it displays its own navigation items.

Behavior of the Combined Provider and Navigation Editing and Sorting Pane

Toggling between the two Global Navigation options changes the way the Navigation Editing and Sorting pane displays data, as follows:

  • When Display the navigation items below the current site is selected, the pane splits into Global Navigation and Current Navigation sections, allowing separate configuration of global and current navigation items.

  • When Display the same navigation items as the parent site is selected, the sections are not separated.

This behavior is linked to the CombinedPortalSiteMapProvider, which usually drives top-level navigation menus. The CombinedPortalSiteMapProvider uses items and settings from global navigation when the site does not inherit global navigation items, and it uses current navigation items and settings when the site inherits global navigation. This means that arranging global navigation items is useless if the site inherits global navigation; the site uses current navigation items instead.

Certain restrictions on the Windows SharePoint Services 3.0 SPNavigation object do not allow storing items in the TopNavigationBar property while the site is set to inherit global navigation. As a result, you cannot configure global navigation separately from current navigation unless the site displays its own global navigation items, which renders useless any attempts to customize the global provider.

NoteNote:

Office SharePoint Server 2007 uses the global provider internally, so do not remove its definition from the web.config file.

You can set up each site to determine which navigation links to show and how to sort them.

To change the navigation settings for a site

  1. Click Site actions, and then click Modify Navigation.

  2. To show individual pages under the site, select the Show Pages check box.

    You can choose to sort the pages, links, and subsites automatically or manually.

You can also use the Office SharePoint Server 2007 object model to modify default navigation information. The following code example loads the SPSite object, gets the PublishingWeb object of the top-level Web site, and modifies the navigation information of the site.

SPSite siteRoot = new SPSite("http://ossserver:80");
PublishingWeb myPublishingWeb = PublishingWeb.GetPublishingWeb(siteRoot.RootWeb);
myPublishingWeb.IncludePagesInNavigation = false;
myPublishingWeb.NavigationOrderingMethod = OrderingMethod.Automatic;
myPublishingWeb.NavigationAutomaticSortingMethod = AutomaticSortingMethod.Title;
myPublishingWeb.NavigationSortAscending = true;
myPublishingWeb.Update();

See Also

Community Additions

ADD
Show:
© 2014 Microsoft