Custom Breadcrumbs

I'm trying to create the custom breadcrumbs for a SharePoint site based of an Xml file.

The problem though is that SiteMapPath requires for the Web.sitemap to be in the root of the site, and I cannot figure out where it would be for a SharePoint site.

If someone knows the answer to it, it will be good enough.

Another workaround it is to use ListSiteMapPath, but it requires using predefined navigation data sources. When I create a custom data source with a SharePoint:SPXmlDataSource and point the ListSiteMapPath to it, I receive an error "There was an error rendering the control...Index was out of range". Looks like it cannot use custom source.

Is there a way to make the ListSiteMapPath to work with a custom data source?

Thanks
July 1st, 2013 11:25pm

Hi  OlegO,

Copy and paste that code in your master page and remove your old breadcrumb placeholder...

<div class="custom-breadcrumb">
    <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
        <asp:SiteMapPath SiteMapProvider="SPContentMapProvider" id="ContentMap" runat="server"/>
    </asp:ContentPlaceHolder>  
</div>

CSS Style Listed below:


<style>
.custom-breadcrumb{
padding:5px 0px 5px 5px;
font-family: Arial sans-serif;
font-size:8pt;
font-weight: normal;
background-color: #EEE;
border-bottom: 1px #CCC solid;
}
</style>

Thanks,

Jack

Free Windows Admin Tool Kit Click here and download it now
July 3rd, 2013 2:00am

Hi  OlegO,

Copy and paste that code in your master page and remove your old breadcrumb placeholder...

<div class="custom-breadcrumb">
    <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server">
        <asp:SiteMapPath SiteMapProvider="SPContentMapProvider" id="ContentMap" runat="server"/>
    </asp:ContentPlaceHolder>  
</div>

CSS Style Listed below:


<style>
.custom-breadcrumb{
padding:5px 0px 5px 5px;
font-family: Arial sans-serif;
font-size:8pt;
font-weight: normal;
background-color: #EEE;
border-bottom: 1px #CCC solid;
}
</style>

Thanks,

July 3rd, 2013 9:47am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics