artkonekt / menu

Laravel Menu Component
MIT License
26 stars 150 forks source link

Change checkActivation to public to call on a template render #2

Closed lucasdidur closed 5 years ago

lucasdidur commented 5 years ago

Changed to make in render template check if a parent menu is active when they has a class to collapse


if($item->hasChildren()){
    $item->link->attr('class', 'accordion-toggle');
    $item->checkActivation();
}
lucasdidur commented 5 years ago

I needed to change to public because the theme I'm using has 2 modes of activation.

One is to expand the accordion and another is the active one.

'active_class' => 'menu-open'

https://pastebin.com/re9ujh4x

fulopattila122 commented 5 years ago

Released as v1.3.1