I have a (Publishing)Site Collection which have many sites and subsites. To meet a specific business requirement, I need the navigation settings of a site which is not in current context (It may be another subsite). We can use PortalSiteMapProvider to get the current navigation settings of a site as:

PortalSiteMapProvider provider=PortalSiteMapProvider.CurrentNavSiteMapProvider;

This gives reference to PortalSiteMapProvider of a site in current context. However, I need it for a site which is not in current context. Any ideas?

PortalSiteMapProvider has a property named CurrentWeb which can be set to a SPWeb object. I am not sure if we can use this property.

1 Answer 1


What i read from your question, correct me if im wrong, is you want the navigation to span across site collections.

The OOB hierarcical navigarion providers cannot so this.

There is an MSDN article that can work as a primer to get started here. You can also find several examples on codeplex and by googling Cross Site Collection Navigation.

The way i solve this, is with a custom hierarcical navigation that we populate with search, combined by adding html meta tags and managed properties that contain order and match pattern for selecting parent sites. It is implemented with minimal footprint by using delegate controls.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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