Closed ouardia-y closed 3 years ago
Hello,
SmartBreadcrumbs lets you create/use manual breadcrumb nodes specifically for this issue (dynamic values).
You can't change previous nodes, but you can handle the creation of the nodes in ClientDetails
so that they include the received id
.
Here are some resources to look at:
Basically, it'll look like this:
[Breadcrumb("Clients", FromAction = "MethodA", FromController = typeof(HomeController))]
public ActionResult Clients()
{
return view();
}
public ActionResult ClientDetails(int id)
{
// Create 3nodes here, MethodA, Clients (123) and Client Details
// Use them in ViewData["BreadcrumbNode"] = clientDetailsNode; (last node)
return view();
}
Hi, thank you so much for your reply. I did try that yesterday but found my issue within your example.
If I have Method A, Method B, Method C, Method D, once I arrived to method D, I didn't add the previous manual breadcrumbs. I simply let the default take over. Which wasn't the correct approach.
Everything works now on my end, I'll close this issue.
Once again, thank you!
Hi,
I'm wondering if there's a way to change a previous node title. For example I have the following:
When I arrive to Client Details, I would like the breadcrumb to look like the following: MethodA / Clients (123)/ Client Details
I'm not sure if this is do-able but it would be great! If you need any clarifications, I'd be more than happy to further explain.