I am using the adminLTE theme for bootstrap and it uses treeview-menu
class in order to operate the submenu.
<?=Nav::widget([
'options' => ['class' => 'sidebar-menu treeview'],
'items' => [
['label' => 'Menu 1', 'url' => ['/a/index']],
['label' => 'Menu 2', 'url' => ['/custom-perks/index']],
['label' => 'Submenu', 'items' => [
['label' => 'Action', 'url' => '#'],
['label' => 'Another action', 'url' => '#'],
['label' => 'Something else here', 'url' => '#'],
],
],
],
]);
?>
I tried using:
['label' => 'Submenu', 'options' => ['class' => 'treeview-menu'], 'items' =>..
Which obviously does not work.
I noticed that Menu::widget has a submenuTemplate
but when I used that it stopped pickup up the "active".
Is there a way I can change either the way the adminLTE call is being applied to treeview-menu (tried changing it in app.js to dropdown-menu but that didn't help) or re-assign the UL submenu class without going into the vendor code?
Line 65: \yii\bootstrap\Dropdown - function init()