Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Customizing header navigation with a TopNavigationDataSource delegate control


SharePoint provides two primary navigation structures by default: the quick launch displayed vertically on the left-hand side of the page and the top navigation displayed horizontally at the top of the page. The items displayed in these navigation structures may be customized in a variety of methods, including manually per site, using managed metadata, and using custom site map providers. The following screenshot shows the horizontal navigation provided by SharePoint at the top of the page:

In this recipe, we will create a custom site map provider and register it with the TopNavigationDataSource delegate control. There are a variety of techniques to create custom site map providers from code. The site map providers used by SharePoint are derived from the SiteMapProvider class provided by the .NET framework in the System.Web assembly. For the purpose of this recipe, we will create a very simple class derived from...