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

added posibility for assigning routevalues through BreadcrumbAttribute #17

Closed oleksandrnechaiev closed 5 years ago

oleksandrnechaiev commented 5 years ago

Now we can add it like this second param is the name of area if in config routes we have like this {area=Home}/{controller=Home}/{action=Index}

[DefaultBreadcrumb("Home", "Home")] same for BreadcrumbAttribute

zHaytam commented 5 years ago

Hi and Thank you for the PR. I don't think it's a good idea to have RouteValues in the attributes since you can't really set them anyways, might aswell just store the Area's name and set it in the nodes ^^

oleksandrnechaiev commented 5 years ago

Hi, yeah, you are right, well, then we should replace it with Area's name and add creation of it inside constructor instead of just assigning. What do you think?

zHaytam commented 5 years ago

Yeah just keep the area name in the attribute and pass it on the node's ctor. Commit the change and I will merge the pr :p

zHaytam commented 5 years ago

Thank you! I will update the NuGet package when I finish icons.

oleksandrnechaiev commented 5 years ago

Thank you, please, let me know when you update it=) Thanks!

zHaytam commented 5 years ago

Hi, sorry for the delay. The package is now uploaded (https://www.nuget.org/packages/SmartBreadcrumbs/1.0.5).

oleksandrnechaiev commented 5 years ago

Thank you very much!