Closed tusharbsale closed 4 years ago
Did you check https://github.com/zHaytam/SmartBreadcrumbs/wiki/4.-Manual-nodes ?
Did you check https://github.com/zHaytam/SmartBreadcrumbs/wiki/4.-Manual-nodes ?
Yes. i have checked above link. I am using SmartBreadcrumbs v2.0.0 I am able to create a MvcBreadcrumbNode now but wondering how to established relation between parent and child nodes
for ex. I have below to nodes,
var DiaryEntryNodeParent= new MvcBreadcrumbNode("GetJobNotification", "DiaryConfigController", "JobNotification", false, null, null);
var DiaryEntryNodeChild = new MvcBreadcrumbNode("EditJobNotification", "DiaryConfigController", "Create", false, null,null);
ViewData["BreadcrumbNode"] = DiaryEntryNodeParent;
any idea how to achieve same.?
Hello, right now it's possible by doing this:
var childNode2 = new MvcControllerBreadcrumbNode("Controller", "ViewData.Title")
{
OverwriteTitleOnExactMatch = true,
Parent = childNode1
};
Be aware that you must put the last child in the ViewData, not your first.
Just spent some time and able to achieve what i was looking for. here is my working code
var DiaryEntryNodeParent= new MvcBreadcrumbNode("GetJobNotification", "DiaryConfig", "JobNotification", false, null, null);
var DiaryEntryNodeChild = new MvcBreadcrumbNode("EditJobNotification", "DiaryConfig", "Create")
{
OverwriteTitleOnExactMatch = true,
Parent = DiaryEntryNodeParent
};
ViewData["BreadcrumbNode"] = DiaryEntryNodeChild;
Hi , I have question arises now how can i provide different Breadcrumb node name having same action method but with different input parameter.
here is my code
public async Task<IActionResult> Index(bool Modal=false) { if (Modal==true) { return View("Modal"); // this will have link as [Breadcrumb("ModalTrue")] } else return View(config); // this will have link as [Breadcrumb("ModalFalse")] }
how can i achieve above?