Skip to content

DNTBreadCrumb.Core Creates custom bread crumb definitions, based on Twitter Bootstrap 3.x features for ASP.NET Core applications.

License

Notifications You must be signed in to change notification settings

msavarian/microlib-breadcrumb-core

 
 

Repository files navigation

Microlib.BreadCrumb.Core

GitHub Actions status

This is a fork from DNTBreadCrumb.Core I tried to add a new property for adding css class to the bredcrumb.

asp-bootstrap-extra-css-classes="ExtraClass1 ExtraClass2"

Microlib.BreadCrumb.Core Creates custom breadcrumbs, based on Twitter Bootstrap 3.x and 4.x features for ASP.NET Core applications.

Install via NuGet

To install Microlib.BreadCrumb.Core, run the following command in the Package Manager Console:

PM> Install-Package Microlib.BreadCrumb.Core

You can also view the package page on NuGet.

Usage:

  • After installing the Microlib.BreadCrumb.Core package, add the following definition to the _ViewImports.cshtml file:
@addTagHelper *, DNTBreadCrumb.Core
 <breadcrumb asp-homepage-title="Home"
             asp-homepage-url="@Url.Action("Index", "Home", values: new { area = "" })"
             asp-bootstrap-version="V3"
             asp-bootstrap-extra-css-classes="ExtraClass1 ExtraClass2"
             asp-homepage-glyphicon="glyphicon glyphicon-home"></breadcrumb>
  • Now you can add the BreadCrumb attributes 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 TestWebApp, TestWebApp.WithFeatureFolders and TestWebApp.WithRazorPages samples for more scenarios.

About

DNTBreadCrumb.Core Creates custom bread crumb definitions, based on Twitter Bootstrap 3.x features for ASP.NET Core applications.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 70.7%
  • HTML 27.4%
  • CSS 1.3%
  • Other 0.6%