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

Cached title #2

Closed Tronhus closed 6 years ago

Tronhus commented 6 years ago

If you use ViewData.Title on an action, Then on a subaction reference the parent action with FromAction the node title is "ViewData.Title" not the translated value. i changed it so when the Breadcrumb node i processed the title is updated, and cached for later use.

zHaytam commented 6 years ago

Didn't think about that use, thanks for the PR!

zHaytam commented 6 years ago

Actually I just thought about it, although it helps in some cases, in case the value of ViewData.Title on that node changes in the action, your approach would block that which wouldn't be the desired behavior. I will add an option for it, to keep the 2 possibilities. Thanks again!