Horizontal Full Breadcrumb


In SharePoint 2010 out of the box you only get the full hierarchy from the ‘Folder Up’ icon in the ribbon. However, if you’ve ever tried to just copy this control and use it in place of the truncated breadcrumb you’ll find it doesn’t quite behave as you want and there is no intuitive way to make the control render as horizontal. So here is a quick example of how to get a horizontal breadcrumb from the ‘Folder Up’ control that you can use elsewhere in the page.

<style>

/*Breadcrumb */

.MyBreadcrumb {float:left; color:white;}

</style>

<SharePoint:ListSiteMapPath

runat=“server”

SiteMapProviders=“SPSiteMapProvider,SPContentMapProvider”

RenderCurrentNodeAsLink=“true”

PathSeparator=“”

CssClass=“MyBreadcrumb”

NodeStyle-CssClass=“MyBreadcrumb”

CurrentNodeStyle-CssClass=“MyBreadcrumb”

RootNodeStyle-CssClass=“MyBreadcrumb”

NodeImageOffsetX=0

NodeImageOffsetY=353

NodeImageWidth=16

NodeImageHeight=16

NodeImageUrl=“/_layouts/images/fgimg.png”

RTLNodeImageOffsetX=0

RTLNodeImageOffsetY=376

RTLNodeImageWidth=16

RTLNodeImageHeight=16

RTLNodeImageUrl=“/_layouts/images/fgimg.png”

HideInteriorRootNodes=“false”

SkipLinkText=“” />

  1. #1 by Johnny on December 20, 2011 - 8:26 am

    Great, I was just trying to do this yesterday. This is almost exactly what I need, except that the site collection root is repeated at the front of the breadcrumb trail. I’m sure with some tweaking I can get it right. Thanks,

  2. #2 by Maarten on December 20, 2011 - 4:44 pm

    Good deal 🙂 you can use :first-child to hide the root node.

  3. #3 by Henk on April 3, 2012 - 3:56 am

    Just change the property HideInteriorRootNodes to “true” to hide the TopRootSite link.

  4. #4 by Charlie on October 24, 2012 - 4:23 am

    How amateur I am may well anger you, so I apologise. But where would I place this code?

    Thanks in advance.

    • #5 by Maarten on October 24, 2012 - 9:04 am

      You can either place this in the master page replacing the existing ListSiteMapPath or you can replace it in a single aspx page using sharepoint designer.

(will not be published)


%d bloggers like this: