Search code examples
.netsharepointsharepoint-2007navigationbreadcrumbs

Extending SharePoint Breadcrumbs across multiple site collections


I’ve been trying to find a way to extend SharePoint breadcrumbs across multiple site collections, and I’ve been unable to find a way. I can set the portal site connection setting on the site collection to link to its parent site collection. But, that will not show only one parent site collection. Here’s an example of the type of setup I’m looking at creating.

The root site, Intranet, has a managed path called sites. Under sites there is site collection called HR located at /sites/hr/. Under HR there is another managed path set up called outreach. In outreach there is a site collection called Recruiting located at /sites/hr/outreach/recruiting/. Thus when a user is in the recruiting site, I want them to see Intranet > HR > Recruiting as the breadcrumb trail.

Example as sitemap:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
    <siteMapNode title="Intranet" url="http://intranet/Pages/Default.aspx">
    <siteMapNode title="HR" url="http://intranet/sites/hr/default.aspx">
            <siteMapNode title="Recruiting" url="http://inranet/hr/outreach/recruiting/default.aspx"/>
        </siteMapNode>
    </siteMapNode>
</siteMap>

Setting the portal site connection on recruiting I can get HR > Recruiting when you’re in recruiting and setting the portal site connection on HR I can get Intranet > HR when you are in the HR site. I can’t though.

I’ve tried using the SPXmlContentMapProvider to read the sitemap file, but I’ve been unable to get that to display at all when I set that as the SiteMapProvider for the SiteMapPath of GlobalNavigationSiteMap in the default.master. (GlobalNavigationSiteMap is the SiteMapPath that creates the bread crumbs at the top of the site). The same architecture works well however on a generic .NET application, but does not seem to work in SharePoint. I’ve also properly registered the sitemap as a defaultProvider and been able to use it to replace the TopNavigationMenu. (TopNavigationMenu is the global navigation menu/bar of buttons at the top of the default SharePoint layout).

Is there a way to actually build this functionality into SharePoint?


Solution

  • Since you are implementing a custom masterpage (or customizing the default one), why not replace the breadcrumb control with your own? Or make a custom sitemap provider if you need to combine your sitemap with Sharepoint's generated map.