Top Link bar inheritance in SharePoint 2010
In this article we will be seeing about top link bar inheritance in SharePoint using object model.
In this article we will be seeing about top link bar inheritance in SharePoint
using object model.
I have a site collection and three subsites (Subsite1, Subsite2 and Subsite3).
In the Subsite3 I am going to inherit the navigation links from the parent site
top link bar.
Top Link Bar Inheritance:
The sub site can inherit the navigation links from the parent site top link bar.
When you create a site through user interface (Go to Site Actions => More
Options => Site => Select the template), in the right hand side you could see an
option "More options".
In that you could see Navigation Inheritance section, by default no is selected.
If you choose yes the navigation links from the parent site top link bar will be
Programmatically inherit top link bar:
- Open Visual Studio 2010.
- Go to File => New => Project.
- Select Console Application from the
- Enter the name and click on ok.
- Replace Program.cs with the following
siteCollection = new
web = siteCollection.OpenWeb("Subsite3"))