0

In my SharePoint 2010 solution I am creating Top Link Navigation programmatically ( on feature activation). Now on other feature activation I am adding a subsite to my site. I want my sub site to inherit the parent site's TLN. But I didn't find any parameter for this in the following method e.g. parent.Webs.Add(siteURL, siteTitle, "", Convert.ToUInt32(LOCALE_ID_ENGLISH), siteTemplate, false, false);

How can I inherit Top Link Navigation in my sub site?

2

You can inherit the navigation via:

SPWeb web = parent.Web.Add(/*params....*/);
web.Navigation.UseShared = true;

Use it just after you have created the site.

More Information: MSDN

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.