What the heck is going on with SharePoint Breadcrumbs?

Like many web applications, SharePoint uses ‘Breadcrumbs’ for navigation. This is a set of links that both tell you where in a hierarchy you are, and were you can go to. SharePoint, though, uses two:

WSS-Breadcrumbs-OwnNav

You can see them here at the top left, and then above the word ‘Documents’. But wait, the master page shows us two breadcrumbs? You’re only in one hierarchy, so how does that work? The Planning & Architecture documentation on Technet says:

The default.master master page, which displays form and view pages, includes two breadcrumb controls, a global breadcrumb which contains sites only, and a content breadcrumb, which contains sites and the current page. Some collaboration site templates, such as the Team Site template, also include two breadcrumbs on all Web pages

However, this isn’t quite the complete story.

I found myself looking at navigation similar to this:

WSS-Breadcrumbs-ParentNav

So, I’m in a document library, in a subsite called ‘Parent Nav’. The ‘global’ breadcrumbs still just shows the top site though, and the ‘content’ breadcrumbs has 2 sites in its links. This left me more than a little confused – what the heck made a site appear on the top breadcrumbs or the bottom one?

Well, the names in my site give you a clue as to what is different about where the site ends up being shown – whether it inherits the parent site’s navigation, or whether is has its own. This is set during site creation:

WSS-Breadcrumbs-Setting-Publishing

Or from the Site Settings page. What you see then, though, depends on whether you’re using the publishing features or not:

WSS-Breadcrumbs-Setting-Publishing

or

WSS-Breadcrumbs-Setting-Team

If you select that you don’t want to use the parent’s links, then it’s like you’re breaking out of the ‘navigational context’ of the parent. The ‘Content Breadcrumbs’ (or ‘Title Breadcrumbs’) (the things that go in the PlaceHolderTitleBreadcrumb placeholder in the master page) only start from this context, so they are shorter. However, the ‘Global Breadcrumbs’ now show both the parent ‘context’ and the current site. This is shown below, where both sites are at the same level. The bottom image does not inherit the parent’s navigation:
WSS-Breadcrumbs-ParentNav
WSS-Breadcrumbs-OwnNav

Now, the observant will have noticed that I talk about ‘contexts’ rather than sites. That’s because I tried a hierarchy of sites 4 deep – lets call it A > B > C > D. I made B and D use their own navigation (i.e. not inherit their parent’s). This meant that C would inherit from B. If we view the bottom site, D, what would be shown in the navigation? Would the global breadcrumb contain “A > B > C > D“, or “A > B > D“?

Well, it turned out to be the latter. It appears that the SPSiteMapProvider (which supplies the entries for the global breadcrumbs) provides a trail of the sites up the hierarchy which use their own navigation. The SPContentMapProvider (which supplies the ‘Title Breadcrumbs’), provides a trail of the sites up the hierarchy which do inherit from the parent.

Thus, confusingly you can end up with sites in each of the two breadcrumbs. However, this does hav the advantage that, with deep hierarchies, you can kind of ‘hide’ some of the intermediate layers, as we did with “C” in our test above.

An Added Complexity – Page’s own Breadcrumbs

So, we’ve talked about the 2 breadcrumbs typically found on the master page. There is another one, of course, just to make life confusing. This is actually found in some of the content pages themselves, rather than in the master page. In the screenshot below, everything below and right of the red line is page content, not part of the master page.

WSS-Breadcrumbs-Page-Breadcrumb

Okay, so what’s going on there? Well, first off, the page is defining empty content for the ‘PlaceHolderTitleBreadcrumb‘. In Master pages there are content placeholders, and these can have default content. Pages themselves can defined content for that placeholder, and this overrides the content that was there. That’s what is happening here, and this is making our default content – the breadcrumb – disappear from our page. Then, it is defining it’s own breadcrumb within it’s own content. Lots of pages do this – the home page of your collaboration site does. But why does it need it’s own breadcrumb?

Well, to find out, I hacked one of the pages so it always displayed the Title Breadcrumb. The first thing I noticed on going to the home page of my root site was that the breadcrumb read “Site > Pages > Default.aspx“. Technically that is correct, that is the page being shown, but it doesn’t really match up with the URL for the page and I could see that it would confuse users. Every time they clicked for the home page they are given a page which appears to be two ‘levels down’.

What I don’t understand, though, is why the page doesn’t just override the normal ‘Title Breadcrumb’ with its own. I mean, it could. Instead, though, we have the Title Breadcrumb being overridden with ‘nothing’ so it doesn’t display, and then another navigation control! I don’t know what that’s about…

Advertisements
What the heck is going on with SharePoint Breadcrumbs?

12 thoughts on “What the heck is going on with SharePoint Breadcrumbs?

  1. JLSigman says:

    I hate not being able to easily remove these breadcrumbs. Makes making sections of SharePoint not seeable by other sections a pain.

    Like

  2. Agreed. When they put the breadcrumbs into the Publishing Page layouts they really screwed the pooch.

    You can get some separation of sections of SharePoint by changing navigation inheritance settings – but it’s confusing as hell. As is having two breadcrumbs. Who thought that was a good idea?

    Like

  3. Sailaja says:

    Hi Can someone tell me how to add bread crumbs for the document library? Like I have subfolders in my document library, and the user wants to know which folder he came from.

    Thanks in Advance
    Sailaja

    Like

  4. Erm, the out of the box navigation should show you the subfolders of the document library in the breadcrumb as you navigate into them… …have you customised your pages at all?

    Like

  5. Catherine says:

    The document library shows the breadcrumb trail correctly when you go down the folder levels, but when using the Explorer view the breadcrumb is not updating as you navigate down to a folder in the library. Why is this?

    Like

  6. Becky Atkins says:

    Does anyone have a reply for Catherimes problem – as i have identified the same problem here at work and am trying to find the solution?

    I know other open source document management sites (i.e. Alfresco) had similar problems, but they issued a fix for it. I was wondering whether Microsoft had done the same, or whether we will need to fix it by hand. I have a lot of users here who use Explorer view and are finding it frustrating!

    Like

  7. Hmm. I’m afraid that it’s not a problem I’ve really seen or looked at. I try and avoid the explorer view as it causes all sorts of pain various different ways.

    Have you looked at Microsoft’s Trouble Shooting document for the Explorer View?

    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=C523AC7A-5724-48BE-B973-641E805588F4&displaylang=en

    Although that is mostly about 2003.

    Ah! I just had a thought. When you click in a folder, it only updates the ‘Explorer View’ bit, if I remember correctly. The breadcrumb itself is outside that Explorer View thing, hence it doesn’t get updated. As far as the page itself is concerned, it’s URL hasn’t changed, so the breadcrumb should remain the same, even though the context of the ‘Explorer View’ bit is changing.

    It’d be a tricky one to fix, if that is right – but to be honest, I’m on training at the moment, and I don’t have any way of checking just now.

    Like

  8. Marcel says:

    After migrating our sites to a new url, the global breadcrumb is wrong – points at the ols url. Do you happen to know where I can change it?

    Like

  9. Marcel says:

    To correct the Globa Breadcrumb I went to: Site Actions;Site Settings; Modify All Site Settings; Site Collection Administration; Portal Site Connection and correct the Portal Web Address.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s