Understanding SharePoint 2010 Navigation

Navigation elements are an essential part of any user interface. SharePoint provides navigation features in the form of a top navigation bar, the Quick Launch menu on the left, and the breadcrumbs. The navigation in SharePoint is based on the ASP.NET Provider model, which encapsulates the user interface from the underlying data source. The following sections look at the various user interface elements of the SharePoint navigation in more detail.

Top Navigation Bar

The top navigation bar displays a tab for each site and pages contained within the root site of the site collection based on the navigation settings. A dynamic drop-down menu displays the subsites and pages for each tab.

By default for a team site the top navigation bar does not display subsites and pages. To display the subsites and pages in the top navigation bar, browse to the Site Settings page and go to Navigation under the Look and Feel section. In the Global Navigation section select the Show Subsites and Show Pages options, as shown in Figure 6.10.

Image

Figure 6.10. Global Navigation settings


Did You Know?

If the Show Pages option is disabled, you need to enable the Publishing features at both the site collection scope and site scope.


Click OK and you see the subsite and pages in the top navigation bar, as shown in Figure 6.11.

Image

Figure 6.11. Global Navigation showing subsites


By the Way

The top navigation bar tabs display dynamic drop-down menus for the subsites of a subsite only if the navigation settings of the subsite also have the Show Subsites option set in their global navigation.


Note that you can set these options programmatically by setting the appropriate properties on the PublishingWeb object as shown in the following code:

            using (SPSite site = new SPSite("http://splearn"))
            {
                using (SPWeb web = site.OpenWeb())
                {
                    Console.WriteLine(
"Setting the Show subites and Show pages property for global navigation to true");
                    PublishingWeb pubWeb = PublishingWeb.GetPublishingWeb(web);
                    pubWeb.Navigation.GlobalIncludeSubSites = true;
                    pubWeb.Navigation.GlobalIncludePages = true;
                    pubWeb.Update();
                }
            }

In addition to the previous settings the items shown in the top navigation menu are also governed by the Global Navigation nodes. Browse to the Site Settings page and open the navigation settings. In the Navigation Editing and Sorting section, add a new node with the title Bing.com and URL http://www.bing.com to the Global Navigation and click OK, as shown in Figure 6.12.

Image

Figure 6.12. Navigation and sorting options

You see the new item appear in the top navigation menu (see Figure 6.13).

Image

Figure 6.13. Custom link in Global Navigation

Quick Launch Menu

Like the top navigation menu the Quick Launch menu displays subsites and pages based on the settings in the Current Navigation section of the Navigation settings for the site (see Figure 6.14). However, this is limited to the subsites and pages within the current site. In addition the Quick Launch displays the nodes present under the Current Navigation of the Navigation settings of the current site.

Image

Figure 6.14. Current Navigation options

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset