There are several settings you can apply to breadcrumbs in MOSS, although really some of these are really ASP.NET settings rather than most specific. Previously I’ve mentioned using different SiteMapProviders and rendering the current location as a link. Let’s have a look at another couple of settings:
(Yes, this screenshot shows some other settings – they’re mentioned in the other articles)
Looking at the screenshot we can see how the Path Separator setting allows us to set what we want shown between nodes – rather than ” > ” I’ve used “:”. Not sure when/why you’d want to change that, but I’m sure I’ll be given a design where that is useful sometime!
There’s also the Path Direction setting, which allows us to set whether the breadcrumb should have the current node on the left or right of the breadcrumb – hence the two settings, RootToCurrent and CurrentToRoot. Note, though, that the default path separator doesn’t swap from ” > ” to ” < “.
2 thoughts on “Breadcrumb Path Separator and Path Direction”
Thanks for this great post. I appreciate putting things together for others to find a solution for their problems.
I have ran into these two requirement :
#1. I need to replace the path separator “>” with this ” – “, including a space before and after the hyphen, but definitely without the double-quotes 🙂
It seems like you have done that, but can you please let me know how you did that.
#2 The other need is to have some of my pages on a MOSS publishing site override this breadcrumb, so that we can customize the breadcrumb display text.
An eg. to illustrate:
Currently: “Home – Product Category” and “Home – Product Detail”
As I have just two levels of site hierarchy, top is the home page and second level is the Product categary and Product Detail page (These two pages are at same level). So navigating to any of them interchanges the two breadcrumbs above.
Future Requirement: “Home – Product Category – Product Detail – Part No – Item No”
I understand that this would be possible by having pages at 5 different levels.
But I repeat, I have just two levels of site hierarchy, top is the home page and second level is the Product categary and Product Detail page (So these two pages are at same level)
Any thoughts or suggestions.
Thanks in advance.
Hehe, yes, I probably wasn’t explicit enough – the ASP:SiteMapPath control on your page can have an attribute ‘PathSeparator’. You’ll want to set it to ‘ – ‘. Thus, it’d look something like:
(I’ve snipped the middle, a bit too much code there, and your page/master page should have it already!)
Regarding point #2 – yes, not an uncommon requirement, actually. Unfortunately, SharePoint doesn’t deal with this well out of the box. I’ve blogged about my musing on this a bit before:
The short answer is that to avoid having 5 different levels, you probably need a custom navigation provider. Creating one is a development task (it’s not something you can do through SharePoint Designer!)
I’ve linked to some information about doing this here: