Monday, December 15, 2008

SharePoint: Adding Sub sites to the Top Navigation using SharePoint Object Model

Issue:

Add site S1 (http://localhost:30000/S1 ) to the sharepoint (http://localhost:30000), it appears in the top navigation, now add another site S2 (http://localhost:30000/S2 ) to the sharepoint, click on S1, S2 is not visible in the top navigation

Resolution:

// objSubWeb is the object of the SPWeb pointing to the sub site

objSubWeb.Navigation.UseShare = true;

No comments:

MSDN: U.S. Local Highlights