Giter Club home page Giter Club logo

Comments (8)

nWidart avatar nWidart commented on July 17, 2024 1

I don't want to modify the class name. I'd like to have an active class name on active elements.
This is not something I set manually... but has to be dynamic.

from menus.

gravitano avatar gravitano commented on July 17, 2024

I don't know. Maybe you can create a custom presenter class to allow that.

from menus.

andersao avatar andersao commented on July 17, 2024

nWidart. Could you explain better how you want to handle the classes ? I do not understand

from menus.

nWidart avatar nWidart commented on July 17, 2024

Well, since we add an URL to the MenuItem, it can set the active classes if needed. This is how we do it on a package at work for generating sidebar menus: https://github.com/Maatwebsite/Laravel-Sidebar/blob/master/src/Maatwebsite/Sidebar/SidebarItem.php#L227-L245

@gravitano I don't think this should be in a custom presenter, but in the core of the package itself, since this is basically always needed.

from menus.

nWidart avatar nWidart commented on July 17, 2024

any update ? As this is still not working.

from menus.

gravitano avatar gravitano commented on July 17, 2024

Do you mean change the active class name ?

from menus.

nWidart avatar nWidart commented on July 17, 2024

Yes.

from menus.

gravitano avatar gravitano commented on July 17, 2024

You can modify the menu's view presenter to allow that. Just publish the package's views and modify the class name as you want. http://sky.pingpong-labs.com/docs/2.1/menus#view-presenter

from menus.

Related Issues (20)

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.