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

Support for Razor Pages #5

Closed GocePetrovski closed 5 years ago

GocePetrovski commented 6 years ago

Would be good if this was working with project that uses Razor pages only. Reason being that Microsoft is recommending RP as the preferred approach.

From Create a web app with ASP.NET Core MVC

We recommend you try the Razor Pages tutorial before the MVC/Controller/Views version. The Razor Pages tutorial: Is the preferred approach for new application development. Is easier to follow. Covers more features.

zHaytam commented 6 years ago

Hello and thanks for the request, It would be good to include Razor Pages indeed.

Would people prefer it to be in a new branch/repository (e.g. SmartBreadcrumbs.RazorPages) with a new nuget package and everything or would you prefer it to be in the same project (SmartBreadcrumbs)?

Right now I'm checking if I will have to include extra packages, if yes then mvc people will have to use razor pages packages and vise versa, which I think is a bit not practical.

zHaytam commented 6 years ago

I just checked some stuff in Razor Pages and I will have to create a new project, probably call it SmartBreadcrumbs.RazorPages and modify it using the RP packages.

Will see if I can get the time to do this soon.

ageisen2000 commented 6 years ago

Any updates on this? Or is there any beta packages I might be able to try out?

zHaytam commented 6 years ago

Not at this time, I was in an internship and just got back few weeks ago to school. I am still planning on supporting Razor Pages, will try to do so as soon as possible! Sorry for the delay.

pbros commented 5 years ago

Any news for Razor Pages support?

RuiAAPereira commented 5 years ago

Hello, great work! Have news for Razor Pages?

zHaytam commented 5 years ago

Hello, It turns out that I finally got a project that uses Razor Pages so I will most likely add its support in SmartBreadcrumbs this week (18/03 - 24/03)!

RuiAAPereira commented 5 years ago

Great news, looking forward to it! ;D

pbros commented 5 years ago

I wound up using https://github.com/cloudscribe/cloudscribe.Web.Navigation instead, which allowed me to manage the main navigation and breadcrumbs. You do however have to manually manage the structure in XML

zHaytam commented 5 years ago

I have started refactoring almost all the code in order to make it cleaner as well as being able to handle both MVC and Razor Pages. It will, however, require a bit of refactoring on your ends too (e.g. BreadcrumbAttribute becomes MvcBreadcrumbAttribute).

zHaytam commented 5 years ago

Hello, I'm happy to say that SmartBreadcrumbs 2.0.0 is released, which is a complete rewrite! You can get it from NuGet now.

If you encounter any problem, please open a new issue ASAP! I changed the README to make it lighter and will write a Wiki soon to compensate.

PS: There are some breaking changes, please check the readme/docs