Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

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/

share|improve this answer
    
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). –  Sharath Chandra Oct 22 '12 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. –  Amadeo Gallardo Oct 23 '12 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 :) –  Sharath Chandra Oct 24 '12 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. –  Amadeo Gallardo Oct 24 '12 at 12:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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