Hello, when an accordion sub menu is active, the accordion menu closes again, it wont stay open. These are the active state code.
<a class="menu-link <?php if($page == '1') { echo 'active'; } ?>" href="?page=1">
Hi,
Can you set here show
classes to the menu item to keep the accordion open by default?
<div class="menu-item here show menu-accordion">
...
</div>
Thank you for your answer, but I want it to be open when its active. Not always open. Please see demo1
How to make the menu open when submenu is active?
Hi,
You need to set here show
classes to the submenu accordion's parent item.
Or please provide us more info if you are trying to achieve something else.
Regards.
I have set menu-accordion like this
<div data-kt-menu-trigger="click" class="menu-item here show menu-accordion">
<div class="menu-sub menu-sub-accordion">
Hi,
Can you please try to set data-kt-menu-expand="true"
to keep the active accordions open always? You can also refer to Demo 1 Inner Page layouts submenu and active menu link classes.
Regarss.