vahidn / dntbreadcrumb.core Goto Github PK
View Code? Open in Web Editor NEWDNTBreadCrumb.Core Creates custom bread crumb definitions, based on Twitter Bootstrap features for ASP.NET Core applications.
License: Apache License 2.0
DNTBreadCrumb.Core Creates custom bread crumb definitions, based on Twitter Bootstrap features for ASP.NET Core applications.
License: Apache License 2.0
hi vahid thanks for this project
I have a project that is multilingual.
How can I use this project for multilingual
A typical Controller
[BreadCrumb(Title="Pool Manager", Order = 0, UseDefaultRouteUrl = true)]
public class ManagePoolController : Controller {
[BreadCrumb(Title="List of pool", Order = 1 )]
public IActionResult Index()
{
// code
}
public [BreadCrumb(Title="Create a pool", Order = 1 )]
public IActionResult Create(){
// some code
}
}
When the BreacCrumbAttribute is called on the Controller class Annotation, the followind method (getDefaultControllerActionUrl) return incorect Value :
The getDefaultAction(filterContext) don't return "Index" as in Asp.net core 2.1, because contextFilter.RouteData is not set.
So the breadcrumb don't display Link for "Pool Manager".
Home / Pool Manager / Create a pool
In Asp.net 2.1, Pool Manager is a link to /PoolManager/Index
private string getDefaultControllerActionUrl(ActionExecutingContext filterContext)
{
var defaultAction = getDefaultAction(filterContext);
var urlHelper = getUrlHelper(filterContext);
if (RemoveAllDefaultRouteValues)
{
return urlHelper.ActionWithoutRouteValues(defaultAction);
}
if (RemoveRouteValues == null || !RemoveRouteValues.Any())
{
return urlHelper.Action(defaultAction);
}
return urlHelper.ActionWithoutRouteValues(defaultAction, RemoveRouteValues);
}
So the
DNTBreadCrumb.Core version: 1.9.1
.NET Core SDK version: 3.1
IDE: Visual Studio
Great library,
I'm currently having problems using this with Areas or Attribute Routing including supporting Features support as shown here
https://msdn.microsoft.com/en-us/magazine/mt763233.aspx
Also I get an exception when applying
UseDefaultRouteUrl()
An unhandled exception occurred while processing the request.
InvalidOperationException: The default route of this controller not found.
DNTBreadCrumb.Core.BreadCrumbAttribute.getDefaultControllerActionUrl(ActionExecutingContext filterContext)
[Area("Admin")]
[Route("[area]/[controller]/")]
[BreadCrumb(UseDefaultRouteUrl = true, Order = 0)]
[DisplayName("DisplayName Controller")]
I think the real issue here is attribute routing?
hello, I like this, I was hoping to share a suggestion.
Right now it has to be added to every action, by default it would be nice to make it a partial thats part of the main theme and auto renders based on the controller/action path by default. So that the specific action-views dont have to worry about it.
thanks
is there a way to change the CSS look and feel of the control , change colors ,fonts ???
Attribute breadcrumb not working for http Post form submit and loosing all breadcrumb.
Hi,
Thanks for the project, it is a great library!
My issue is, I am trying to navigate from one controller to another controller's action and I want to show the breadcrumb as
Controller1> Action1 > Action2
or
Controller1> Action1 >Controller2 > Action2
Action1 belongs to Controller1 and Action2 belongs to Controller2. Is there a way to provide this output with this library? I tried ClearStack=false
to provide previous pages breadcrumb but it didn't work.
Thanks
Is it way to fill a title in a Action Link by a variable (or resx) instead of a const
// now
[BreadCrumb(Title = "Main index", Order = 1, IgnoreAjaxRequests = true)]
public ActionResult Index()
// i would like
var varTitle= "My variable title comming from resx";
[BreadCrumb(Title = varTitle, Order = 1, IgnoreAjaxRequests = true)]
public ActionResult Index()
How can i do that ?
سلام جناب نصیری
من صفحاتی دارم که به صورت Ajax داخل layout بارگذاری میشه. به چه صورتی میشه ساختار مسیریابی تغییر کنه؟
در همه Action ها ساختار زیر وجود دارد.
[BreadCrumb(Title = "Home", UseDefaultRouteUrl = true, Order = 0)]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.