Problem/Motivation

The menu works flawlessly but it lacks some features. I want the child items of the parent menu to expand vertically (below the parent) instead of slide-in feature. I tried following the mmenu.js documentation and they do have an option override, however I can't get it to work with Drupal's menu.

Is there a way to achieve what I'm looking for? If not, please add this feature because it'll make the module so much better.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

devKhairul created an issue. See original summary.

tanc’s picture

Can you provide a link to the page on the mmenu site with this feature so I know what you mean?

Unfortunately I don't have time to add new features but if you can debug why you can't get it to work and propose a change to the default template (if that is the issue) then I'd be open to it.

I assume you've tried to modify the config or options as per the README.md?

tanc’s picture

Version: 4.4.0 » 4.4.x-dev
Priority: Critical » Normal

Definitely not critical as this is a feature request not a bug which completely stops the module from working.

devKhairul’s picture

Hi, sorry for choosing the wrong priority.

I got it to work by adding the option to the config file. It works great now. You can mark this Fixed too. Thanks!

tanc’s picture

Status: Active » Fixed

Good stuff! Could you share your code so others can benefit?

devKhairul’s picture

Of course.

const options = {
          extensions: [
            theme,
            'fx-menu-slide',
            position === 'left' ? 'position-left' : 'position-right'
          ],
          keyboardNavigation: {
            enable: true,
            enhance: true,
          },
          drag: {
            open: settings.drag
          },
          slidingSubmenus: false
        };

I just added the 'slidingSubmenus: false' option to the variable (in responsive_menu.config.js) which essentially opens the submenu items vertically instead of a slide-out window.

devKhairul’s picture

I do have a silly question though. I know this change will get overwritten when I update the module; in fact there's an update available right now. What's the best way to handle this? How can I copy the file to my theme so it doesn't change my custom configurations? Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

astoker88’s picture

trying to follow this thread - did this get merged in?

If not patch incoming

tanc’s picture

My comment in #2 is still relevant and I think devKhairul didn't quite understand and modified the config directly in the module by the looks of it.

Here is a link to the relevant section of the README https://git.drupalcode.org/project/responsive_menu/-/blob/4.4.x/README.m...

astoker88’s picture

trying to follow this thread - did this get merged in?

If not patch incoming

tanc’s picture

I'm not going to merge it. Please see the README that I linked to for instructions on how to add your custom config for your needs.

astoker88’s picture

astoker88’s picture

@tanc apologies didnt fully read your last comment. works fine for me adding "slidingSubmenus" => FALSE,