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:

c# httpclient The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch

 If we get this error while trying to get http reponse using HttpClient object, it could mean that certificate validation fails for the remo...