HOWTO: jump menus in Drupal 8

HOWTO: jump menus in Drupal 8

In drupal 7 there are some modules to do it, including ctools, but at present, none of them have stable or even an alpha version.

But with long standing and wonderful superfish module we can achieve it!

Just install it and place your menu superfish type block (at /admin/structure/block) at your desired region. Then, at block config options go to sf-Smallscreen settings and:

  • Ensure "Convert the menu to a <select> element." is on (default behavior)
  • Choose when transform your menu in a jump menu:

 

  1. Desactivar.
  2. Enable jQuery sf-Smallscreen plugin for this menu.
  3. Enable jQuery sf-Smallscreen plugin for this menu depending on the user's Web browser window width. (Predeterminado)
  4. Enable jQuery sf-Smallscreen plugin for this menu depending on the user's Web browser user agent.

 

If you choose second option, you get a jump menu always, not depending of screen width...

That's all!

Ps: it's possible get an accordion menu just using "Convert the menu to an accordion menu" instead of "Convert the menu to a <select> element."

joan