SideNav submenu active


Topic: SideNav submenu active

m.hamacher pro premium priority asked 6 years ago

Hello,
How can I set an submenu item active in SideNav?
I can set the main items active by adding the class active or current. But when I add this to a submenu item there is no style change, so that it is not indicated on which page I am. I tried adding the class to the li-tag as well as to the a-tag.

Kind regards.


Anna Morawska staff answered 6 years ago

Hi there,

you can try to add mask to the active li element, for example:

         <li class="mask rgba-blue-light">
             <a href="#" class="waves-effect">FAQ</a>
         </li>

The complete list can be found here

Best, Ania


m.hamacher pro premium priority commented 6 years ago

Hi Ania, first of all thanks for the tip. But thats not really what I'm searching. I thought maybe there is a class I missed, which automatically marks the link active as it is with the active and current class for the first menu level. My thought was, that it should look like in the seidenav of this site. There the active submenu links have the primary text color. For now I will use the text-primary class to indicate the active submenu, but maybe it can be implemented in a further version that you can use .active or .current within submenus.

Best, Matthias


Anna Morawska staff answered 6 years ago

Hi there,

right now there is no such option, but we will add it to our TODO list. Thanks for the suggestion, we appreciate this.

Best,

Ania


Pytchoun answered 6 years ago

What is the slim side-nav from the last update ?


Marta Szymanska staff pro premium answered 6 years ago

Hi,

we need to add this to the documentation but try code from this snippet (it works only in the newest 4.7.1 package): https://mdbootstrap.com/snippets/jquery/marta-szymanska/340350.

Best, Marta


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.6.1
  • Device: MacBook Pro
  • Browser: Chrome
  • OS: macOs High Sierra
  • Provided sample code: No
  • Provided link: No