SharePoint 2010: Point a PortalSiteMapProvider to a specific site collection

2.5k views Asked by At

Is it possible to get an OOTB PortalSiteMapProvider to provide a site heirarchy from a specified site collection or URL (i.e. not the current site collection) in SharePoint 2010? In MOSS this was only possible by creating a custom SiteMapProvider, traversing the site collections and manually building the navigation tree.

NB: I am not prepared to write a custom SiteMapProvider that reads from a static XML (.sitemap) file as the regular site contributors may not have access to files on the file system.

A little bit of background... I have a single web application with 2x site collections:

  • 1 for my intranet portal at http://intranet/ (publishing enabled)
  • 1 for the My Sites at http://intranet/my (publishing not enabled)

We have no plans to facilitate multiple portals, therefore, I would like a consistant global navigation bar across both site collections. Ideally, I'd like the My Sites to show the site heirarchy from the main portal site. So is it possible to set the PortalSiteMapProvider.CurrentSite property to "http://intranet/" instead of "http://intranet/my"?

1

There are 1 answers

0
AudioBubble On BEST ANSWER

To achieve this behaviour I wrote my own web service which goes off and traverses another site collection's hierarchy (using it's own PortalSiteMapProvider), and returns that structure as an XML document. I obviously then bound my global navigation navigation menu to that.

I got the concept from here: PortalSiteMapProvider

There is a similar approach describes here which uses HttpHandlers instead: http://blog.symprogress.com/2011/03/sharepoint2010-custom-navigation-provider-cross-sitecollection/