Forums / All Other Contributions/Addons / Horizontal Drop Menu sort order of mega-menu

Horizontal Drop Menu sort order of mega-menu

Views: 2,719

Results 1 to 4 of 4
19 Oct 2011, 1:08 PM
#1
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Horizontal Drop Menu sort order of mega-menu

I'm using the alternate ul generator from horizontal dropdown menu by get em fast. I'm wondering if anyone would know how to sort the categories submenu in alphebetical order vertically rather than horizontally? I looked through the categories_ul_generator.php but my inability to understand php got me lost pretty quick.

19 Oct 2011, 1:21 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Horizontal Drop Menu sort order of mega-menu

That would probably be very complex. You can't just sort vertically; you would have to sort horizontally and then put the items in an n-by-n array and flip it rows-for-columns (something I don't have practical experience with), and that might still mess up if there are sub-subcategories in the dropdown.
The other possible approach, which actually has a chance of working in likely situations, would be to insert div wrapper tags into the final output string every so many items (calculated to yield the desired number of divs), and then give the divs a width and float them left so they sit side by side. My String Replace at Intervals mod in Free Addons can help with this. It is discussed in a forum thread where I worked out its base code with a poster developing a mega-menu display.

19 Oct 2011, 2:15 PM
#3
familynow avatar

familynow

Zen Follower

Join Date:
Aug 2011
Location:
Near Ottawa, Ontario, Canada
Posts:
321
Plugin Contributions:
0

Re: Horizontal Drop Menu sort order of mega-menu

Obviously one of those things that sounds simple in lay terms...

19 Oct 2011, 3:39 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Horizontal Drop Menu sort order of mega-menu

A very tedious method you could use without new coding would be to give sort orders to the subcats so that they end up appearing as if they are sorted in columns. This would, however, cause odd sorting in other displays than the mega menu, if you have any other displays.