2

I have an application which has multiple site collections. For the business requirements I need to show the navigation of a site collection outside the context of current site collection. for e.g. The user is on the Home page which is under the root site collection. Now I need to get the site map of a different site collection (/Sites/Organization).

Is there any recommended way of doing this?

1 Answer 1

0

I've done this by creating a custom SiteMapProvider that exposes the navigation from the wanted site collection. Then, in the menu control in the consuming site collection you reference that navigation provider in the SiteMapDataSource. Something like:

<asp:SiteMapDataSource ID="myCustomDataSource" runat="server" SiteMapProvider="MyCustomNavigationProvider" StartingNodeOffset="0" ShowStartingNode="true"  />

Here are the 2 links that I used in order to develop this functionality.

http://blog.symprogress.com/2011/03/sharepoint2010-custom-navigation-provider-cross-sitecollection/

http://michaelbrockman.wordpress.com/2010/07/06/cross-site-collection-navigation/

4
  • Hi, The links provided are of great help. However, I am facing an issue in the handlers. I am unable to iterate through the child sites from the root site collection. The site is a Claims based authenticated site(Windows Authentication). Oct 22, 2012 at 14:30
  • Haven't dealt with the claims based authentication for the site collection iteration. If this approach solves the main Cross Site Collection Navigation issue, maybe you can mark this as an answer and post a new question to solve the Claims Based child collection iteration. Oct 23, 2012 at 0:01
  • 1
    Hi,During debugging I see that I am able to see the child nodes in the handler under PortalSiteMapProvider.WebSiteMapProvider, but not in any other PortalSiteMapProvider properties. Any ideas on this behavior? Anyways I will raise a separate question for that. Thanks for the help :) Oct 24, 2012 at 9:05
  • Hmmm, not sure about that... The idea is that you get the child nodes from the PortalSiteMapProvider and expose the required properties for the consumer in a serializable way (such as json). Please attach the link to the next question with the full details and I'll try to help you out. Oct 24, 2012 at 12:34

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.