Code Monkey home page Code Monkey logo

dntbreadcrumb.core's People

Contributors

joergpichler avatar vahidn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dntbreadcrumb.core's Issues

Using Resources for the title

hi vahid thanks for this project
I have a project that is multilingual.
How can I use this project for multilingual

Asp.net core 3.1 - BreadCrumbAttribute don't file default Action of Controller

Summary of the issue

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

Environment

DNTBreadCrumb.Core version: 1.9.1
.NET Core SDK version: 3.1
IDE: Visual Studio

Areas / Features Support?

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?

Make this ia partial and include in the main theme

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

Keeping Breadcrumb values instead of clearing it in every controller

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

title comming from variable

Summary of the issue

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

سلام جناب نصیری

من صفحاتی دارم که به صورت Ajax داخل layout بارگذاری میشه. به چه صورتی میشه ساختار مسیریابی تغییر کنه؟
در همه Action ها ساختار زیر وجود دارد.
[BreadCrumb(Title = "Home", UseDefaultRouteUrl = true, Order = 0)]

Previous item link

چه طوری میشه در صفحه create به صفحه قبل مه Index هست لینک بشه

Screenshot_2019-11-29 پنل مدیریت آراد کنسرت

یعنی ایتم سالن در این صفحه باید فعال باشد و به صفحه index لینک شود؟

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.