Breadcrumbs With Multiple Folders

1 Answer 82 Views
Breadcrumb
Matthew
Top achievements
Rank 1
Matthew asked on 15 Feb 2022, 10:15 PM

I'm trying to use the Kendo UI Breadcrumb component.  I have it set up like so:

 

            @(Html.Kendo().Breadcrumb()
            .Name("breadcrumb")
            .BindToLocation(true)
            .Navigational(true)
            )

 

This works fine, except when routing to a page multiple levels down in my web app.  For example, my project structure is:

Pages/Index.cshtml
Pages/Core/Page2.cshtml

So Pages/Index.cshtml  shows just the Home icon.  Great.

But pages/Core/Page2.cshtml shows this in the breadcrumbs:  HomeIcon > > Page2  instead of HomeIcon > Page2

How do I make the breadcrumb not display that blank space where a folder isas part of the path?  I don't want to hard code the breadcrumbs -- that sort of defeats the purpose. 

1 Answer, 1 is accepted

Sort by
0
Patrick | Technical Support Engineer, Senior
Telerik team
answered on 18 Feb 2022, 05:16 PM

Hello Matthew,

Based on the information provided, the Kendo UI BreadCrumb is appearing as expected with the project structure mentioned using the latest version(2022.1.119).  The BreadCrumb is placed in the _Layout page and is used for all pages.  

 

Please let me know if there is something I am missing compared to your web application.

Regards,
Patrick | Technical Support Engineer, Senior
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Matthew
Top achievements
Rank 1
commented on 18 Feb 2022, 05:32 PM

Hi, Patrick,

 

On my application, for whatever reason, "Core" doesn't show up.  There's just a blank space.

Regardless, that isn't really what I want.  "Core" has no meaning as a navigation item.  It's useless to the user and potentially confusing.  What I'd like to know is if there is some way to configure the Breadcrumb to ignore intermediary folder structure and only show Home > Page 2

Patrick | Technical Support Engineer, Senior
Telerik team
commented on 21 Feb 2022, 07:09 PM

When the BindToLocation configuration is enabled, the path will display as it is in the address bar.   At the moment, there is not a configuration which would allow to exclude or skip and item from the breadcrumb.

That being said, we have a feature request which asks for your requested functionality, and I have added a vote on your behalf.  Please feel free to follow it for potential updates and leave any comments within the thread for the developer community.  

Tags
Breadcrumb
Asked by
Matthew
Top achievements
Rank 1
Answers by
Patrick | Technical Support Engineer, Senior
Telerik team
Share this question
or