Hi there,
Recently started using breadcrumb in a ASP.net core application, so far i have no issues with the rendering side of things nor adding items to the breadcrumb.
The main issue i am having is with the breadcrumb persisting during the session, meaning that i cant seem to be able to add to the list of items on entering a new page without the previous ones (except for the root item) being forgotten about.
in _layout.cshtml:
@(Html.Kendo().Breadcrumb() .Name("breadcrumb") .Navigational(true ) .Items(items => { items.Add() .Type(BreadcrumbItemType.RootItem) .Href("/") .Text("Home") .Icon("home") .ShowIcon(true) .ItemClass("root") .IconClass("root") .LinkClass("root"); }) )
script present in other pages (specifics in this code change based on the page of course):
$(function () { var breadcrumb = $("#breadcrumb").data("kendoBreadcrumb"); breadcrumb.items().push({ href: "/Product/Groups", itemClass: "item", type: "item", text: "Product Groups", showText: true, showIcon: false }); breadcrumb.refresh(); });