cancel
Showing results for 
Search instead for 
Did you mean: 

Changing layered navigation from accordion to dropdown.

Changing layered navigation from accordion to dropdown.

Hi,

Using Magento 2.3.2.

 

I have managed to horizontally align my layered navigation rather than having them in a side column, but now I need to change them from an accordion that pushes the content down into dropdown menus. Preferably with "Filter by attribute name' as the default as per the filter on this page/site - 

https://www.suttons.co.uk/Gardening/Vegetable-Plants/Popular-Vegetable-Plants/Bean-Plants/list.htm

 

Is this possible?

Any help would be gratefully received.

 

6 REPLIES 6

Re: Changing layered navigation from accordion to dropdown.

Try in mixin

define(["jquery"], function($) {
  return function(widget) {
    $.widget("mage.collapsible", widget, {
      _create: function() {
        this.storage = $.localStorage;
        this.icons = false;

        if (typeof this.options.icons === "string") {
          this.options.icons = $.parseJSON(this.options.icons);
        }

        this._processPanels();
        this._processState();
        this._refresh();

        if (this.options.icons.header && this.options.icons.activeHeader) {
          this._createIcons();
          this.icons = true;
        }

        this._bind("click");
        this._trigger("created");
      }
    });
    return $.mage.collapsible;
  };
});

Re: Changing layered navigation from accordion to dropdown.

Hi, I have got the same error today and it has been poping up not for the first time in the last view days.. could You pleased fix it  my gift card site
Thanks so much, your suggestion worked for me.

Re: Changing layered navigation from accordion to dropdown.

Changing the layered navigation from an accordion to dropdown menus is possible in Magento 2.3.2.

Re: Changing layered navigation from accordion to dropdown.

I checked the page you shared, and the dropdown style looks neat.
To achieve this, you'll need to tweak some CSS and modify the template files. Plenty of resources online can guide you through the process step by step.
By the way, don't forget to take some breaks and unwind while working on your project. Speaking of which, have you ever considered playing musical instruments like concertinas? They're unique and quite enjoyable to play. I spotted some concertinas for sale recently, and it got me curious about trying one out.

Re: Changing layered navigation from accordion to dropdown.

Hello,

In Magento 2.3.2, you can customize your layered navigation by modifying the theme's XML files and CSS. To change the accordion-style layered navigation to dropdown menus, you'll likely need to work with a developer who can create a custom theme or customize your existing one.

Re: Changing layered navigation from accordion to dropdown.

Hello,

In Magento 2.3.2, you can customize your layered navigation by modifying the theme's XML files and CSS. To change the accordion-style layered navigation to dropdown menus, you'll likely need to work with a developer who can create a custom theme or customize your existing one.