zHaytam / SmartBreadcrumbs

A utility library for ASP.NET Core (both MVC and Razor Pages) websites to easily add and customize breadcrumbs.
https://blog.zhaytam.com/2018/06/24/asp-net-core-using-smartbreadcrumbs/
MIT License
161 stars 77 forks source link

Create breadcrumbs for RazorPage parameters? #103

Closed rmatejka closed 2 years ago

rmatejka commented 2 years ago

I have a single page with a handler that accepts two parameters - call them parentCategory & childCategory which are optional. In use, the user can select a parent category and select a child category so the hope is to get the breadcrumbs like so:

Page -> parentCategory -> childCategory

I've tried using manual nodes but I can't seem to pass the necessary route parameter. Is there some other way to accomplish this? Thanks, Rick

rmatejka commented 2 years ago

OK I see that the RouteValues property is available on RazorPageBreadcrumbNode. That does the trick