This was such a good question, I thought I’d reply in a post about it:
I am trying to limit the depth of the breadcrumbs. I have a sub sub sub subsite that I want breadcrumbs to show from that site and down one more level. I can make the breadcrumbs invisible using SPD but I wonder if I can make them limited … like we could in WSS 2. - Jo Arnspiger
Well, there are a couple of ways that spring to mind (there are many approaches, but these are probably the best two) – one that uses SharePoint Designer, and one that uses SharePoint’s own navigation configuration.
First off, let’s look at the SharePoint Designer route. If you go to your master page or page layout, you’ll see an ASP control called the SiteMapPath control. It has a property called ParentLevelsDisplayed.
Set that to a number, and that should be the maximum number of levels shown. If you set it to -1, it will show however many levels there are, which is it’s default. (I’ve not tried it, but I’m pretty sure that’s the case). That’s probably what you want, but there is a problem – it’s not just your master page which defines the SiteMapPath control. There is one on most of the Publishing Page layouts that come out of the box too. Still, if you’re happy taking a little time to change all of them, then that’s probably fine.
The other problem is a little more fundamental – this setting will apply across your entire site collection. Well, okay, maybe not, but it’ll apply for all pages using that master page or page layouts…
Alternatively, you could change the Site’s navigation settings to get what you want. At the ‘sub sub sub subsite‘ you could change the site’s navigation setting to not inherit it’s top navigation settings from the parent site. This will add a level to the ‘Global Navigation’ breadcrumb, but also make all URLs below the ‘sub sub sub subsite‘ start at that level. See my previous article for an explanation.
The down side about this approach, though, is that it means all of your top navigation tabs will change – you really are breaking with the ‘navigation context’ of the parent site. (That’s my term – I didn’t know what else to call it.) There is an example of this on the article linked to above.
A final note, these approaches do have two slightly different results – the first route is a ‘only show the last X items’, while the second is ‘chop all breadcrumbs below this site to start here’.
Anyway Jo, I hope that one of those is suitable.