Portal Site Connection and Publishing Sites in SharePoint 2010

The Portal Site Connection can be a useful way of making your breadcrumbs link to a site collection that is ‘above’ them in the logical architecture of a site. It’s also a good way of navigating out of Search Sites and My Sites – which are kind of navigational black holes.

Unfortunately, they don’t work in Publishing sites. I investigated why.

Well, my hunch was that it was related to the SiteMapProvider that publishing pages use. I knew that publishing pages use a different set of site map providers. So, I copied the ListSiteMapPath control on a publishing page, and changed it’s provider to be the same as on a Team Site. Below shows the Publishing ListeSiteMapPath control, and then one using the same provider as a team site:

This produced:

So, CurrentNavigation doesn’t obey the Portal Site Map Connection, but SPSiteMapProvider does. What are these defined as? Well, they’re in Web.config.

<add name="SPSiteMapProvider"
 type="Microsoft.SharePoint.Navigation.SPSiteMapProvider,
   Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<add name="CurrentNavigation"
 description="Provider for MOSS Current Navigation"
 type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider,
  Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
 NavigationType="Current" Version="14" />

So, why two different providers? Well, basically, the SPSiteMapProvider (and other non-publishing navigation providers) don’t know about Publishing Pages:

As you can see, this shows how one provider shows pages, but the other can show the Portal Site Map Connection. So it appears that Publishing Navigation Providers don’t ‘know’ about the Portal Site Map Connection, and that we can’t use it in Publishing Sites. Which sucks.

Oh, I did try different NavigationTypes (Global, Current, Combined) – it didn’t work for any of them. And I tried other navigation providers:

SPContentMapProvider:

Doesn’t show the portal site map connection, and it does show the Pages library level.

And SPNavigationProvider just seemed to throw an ArgumentOutOfRange exception:

So, conclusion – you can’t use a Portal Site Map Connection in a Publishing Site. The Publishing SiteMapProviders are too important to swap out, and they just don’t understand the Portal Site Map Connection.

3 thoughts on “Portal Site Connection and Publishing Sites in SharePoint 2010”

  1. Lately, I have been trying to understand how breadcrumbs will work in in publishing sites. That is my template of choice when dealing with extensive branding and most flexibllity. Not using the “Portal Site Connection” feature because of breadcrumb nuances is one of those “SharePoint give or take” features. I would probably rely on additional branding to handle the in place of the “Portal Site Connection.”

    As always, good write up!

    -b

  2. I stumbled on this posting as I was researching this exact issue. I found that it doesn’t show up immediately, but it will eventually show up. I forced it to show by performing an IISRESET, though an App Pool Recycle would probably work as well. I am running SP 2010 + SP1 + December 2011 CU. It likely has to do with the caching the portal navigation providers does.

  3. Like Brian, I stumbled on this post whilst tryring to figure out why the Portal Site Connection wasn’t appearing in my breadcrumbs. In the time it took me to open my masterpage in order to see what my ListSiteMapPath.SiteMapProvider setting was, it had suddenly just appeared. I assume there’s some in-built caching being performed by either the ListSiteMapPath control or the sitemap provider class.

    I can confirm that my ListSiteMapPath.SiteMapProvider property is set to CurrentNavigation and that the portal site connection is showing up in front of both the global breadcrumb popout menu and the page-level breadcrumb.

Comments are closed.