Superfly Menu - How to keep the menu static

Hi,
I have enabled the Superfly menu plugin and have created a left menu using below options
Design - Side Panel
Behavior - Always visible

Click on a sub-menu’s opens the required page in the main window but sub-menu structure is reset. How can i keep the sub-menu at same state when it was clicked, i want to keep sub-menu in collapsed state at the same level ?

Please guide and help.

Hi @chhavinarang,

Unfortunately, there is no available settings on the plugin that will open the submenu by default when it is an active menu. It is possible with customization but it would be outside the scope of our support.

Here’s a guide on a to inspect element:

Once you inspect the element, you can see there is an active class added on the active menu sfm-active-class. You may use the class the manipulate the display on load. You can add the custom CSS on Superfly settings > Advanced tab > Additional CSS

Hope this helps.

Hi Lely,

Thanks for the response. I will start the explore custom setting, i just wanted to make sure that i explained my issue correctly. If you again review below and let me know

Problem - When user clicks on sub menu - it takes an action and closes. I want to the menu remain open . Using the site as an example (www.kidzezone.com) and two states
Before Click - Menu is in expanded form and user click (e.g. Comprehension)


After Click - Menu goes to uncollapsed form. I wanted to keep it in collapsed form ( expanded form)

It seem the menu is reloaded (refreshed) to load the page. If there is way to remember the previous state and load to same ?
Thanks

Hi @chhavinarang,

Thanks for the clarification, that’s accordion type menu. Please go to Admin > SuperFly Menu > Menu Panel, then make sure the sub-menu is triggered by click.

image

Thanks!

I have the Menu panel configuration already set for click. How do i keep the menu in collapsed format after doing a click. Menu should not close after click.

Hi @chhavinarang,

I checked the settings of the SUperFly plugin and unfortunately, there is no option to force the accordion items to expand while drilling down to the current menu item.

You can customize the menu to force the expansion somehow but it is outside of our support scope and we can not implement the functionality.

Here is what I have in mind for the link below as an example:

The Cut and Paste menu item is the last active one. There is a unique class sfm-active-class which shows the currently active menu item. Now, if we find the parent li elements we will find the top-level accordion menu items and if we mimic the click event it will be as we manually go and click the proper accordion menu items to force the accordion show the active item.

I came up with the Javascript code below that you can add into X > Theme Options > JS and it should work ok:

jQuery(window).load(function(){
  jQuery('.sfm-active-class').parents('li').trigger('click');
});

The side effect of the code above is that it needs to wait for the whole page to load to make sure the accordion menu is loaded, and then attempts to mimic the clicking, So at the first glance the menus are closed and the whole page should be loaded, and then it expands with animation. Not an ideal situation but it is better than nothing.

Please kindly consider that the code above is just a starting point on your journey to customize the SuperFly plugin to have active expanded accordion menus. We will not be able to help further and we suggest that you hire a developer if you consider having a more robust solution.

Thank you for your understanding.

@christopher - Thanks for the reply. Will explore the suggested code and make changes… Many Thanks for the inputs!

You’re welcome!
We’re glad @Christopher were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.