Thursday, July 21, 2016

Hide Pages link in SharePoint breadcrumb

Its possible to have a custom site map provider developed in C# and use it to hide pages link in the breadcrumb, but while looking for a rather simpler solution, I found out the blog post below which mentioned a much cleaner and less time consuming way of achieving similar result.

The trick is to add two breadcrumb controls in master page, one for path and another one for the leaf node like so:

<asp:SiteMapPath ID="bestpath" Runat="server"
        SiteMapProvider="GlobalNavSiteMapProvider"
        CssClass="ms-sitemapdirectional"
        NodeStyle-CssClass="ms-sitemapdirectional"
        RenderCurrentNodeAsLink="true"
    /> >
    <asp:SiteMapPath ID="bestsubpath" Runat="server"
        SiteMapProvider="SPContentMapProvider"
        CssClass="ms-sitemapdirectional"   
        NodeStyle-CssClass="ms-sitemapdirectional"
        RenderCurrentNodeAsLink="false"
        CurrentNodeStyle-CssClass="breadcrumbCurrent"
        ParentLevelsDisplayed="0"

    />

No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...