DNTBreadCrumb
Creates custom bread crumb definitions, based on Twitter Bootstrap 3.x features.
To install DNTBreadCrumb, run the following command in the Package Manager Console:
PM> Install-Package DNTBreadCrumb
You can also view the package page on NuGet.
- After installing the DNTBreadCrumb package, add the
Views\Shared\_BreadCrumb.cshtml
definition to your_Layout.cshtml
file:
@{Html.RenderPartial("_BreadCrumb");}
- Then add the
BreadCrumb
attribute to your controller or action methods:
[BreadCrumb(Title = "Home", UseDefaultRouteUrl = true, Order = 0)]
public class HomeController : Controller
{
[BreadCrumb(Title = "Main index", Order = 1)]
public ActionResult Index()
{
return View();
}
Please follow the MVCBreadCrumbTest
sample for more scenarios.
The current library is designed for ASP.NET MVC 5.x. Please use this package for .NET Core: DNTBreadCrumb.Core.