Jump to content

Vertically Output Manufacturers In Alphabetical Order


HAIRWEBSHOP

Recommended Posts

Found a solution myself.

 

Add the following snippet to blocktopmenu.js that can be found inside /themes/default-bootstrap/js/modules/blocktopmenu/js

$(document).ready(function(){
$('#block_top_menu li').each(function(index){
  $(this).attr('class', 'menuItem_' + index);
});
});

Now that every menu item as its own class, add the following CSS to your custom stylesheet:

.menuItem_1 ul  {
-webkit-column-count: 5;
-moz-column-count: 5;
column-count: 5; 
}


.menuItem_1 li {
float: none !important;
width: auto !important;
}


@media (max-width: 767px) {
.menuItem_1 ul  {
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2; 
}


.menuItem_1 li {
float: none !important;
width: auto !important;
}
}


@media (max-width: 479px) {
.menuItem_1 ul  {
-webkit-column-count: 1;
-moz-column-count: 1;
column-count: 1; 
}


.menuItem_1 li {
float: none !important;
width: auto !important;
}
}
 

Make sure to edit the class to match your menu item's class.
This will vertically output manufacturers in alphabetical order.

Clear all caches afterwards.

Edited by HAIRWEBSHOP (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...