OSAS / strapping-mediawiki

base skin for MediaWiki, based on Bootstrap — layer your own style (fonts, graphics, color) on top
Other
146 stars 35 forks source link

Ability to make top (sidebar) menu dropdown? #30

Open jtbowlin opened 11 years ago

jtbowlin commented 11 years ago

The normal sidebar menu has two levels. However, this theme ignores the upper level and just displays the children. I'd like for it to have the top levels as the main menu items and then dropdown to display the children. Hope that makes sense.

Otherwise I completely love the theme and so do all of my members. Great work!

garrett commented 11 years ago

It would be great to have support for this. It's ideal to have simple navigation, but sometimes a huge hierarchy — especially for a wiki-based side — can't be avoided.

While I'm working on the theme this week, I'll look into this to see if it's easy to do.

Could you provide an example for MediaWiki:Sidebar?

jtbowlin commented 11 years ago

So a bit more info on this. When you enable "$wgStrappingSkinDisplaySidebarNavigation = true;" in strapping.php then it displays them all as dropdown, but you can't have any non-dropdowns. For example, say you have the following MediaWiki:Sidebar:

Below should be a simple vertical list, but for some reason it's formatting it funny and putting * in the same line as the previous \ instead of a new line.

I would expect it to display a dropdown for Mammals and Help, but display a non-dropdown button for Reptiles and Insects. What happens is by default it displays "Bear, Wolf, Contact, About". If you enable the switch above, it shows "Mammals, Help". So, the problem is that it's either one or the other, you can't have a mix of dropdowns and non-dropdowns. Obviously for dropdowns the parent item just opens the list of sub-items and doesn't go to it's own page like the non-dropdowns do.

When you have "$wgSearchPlacement['nav'] = true;" in LocalSettings.php then you get the Search button next to the menu items, even if you have it in dropdown mode.

Not sure if that helps you figure it out or not. I'm more of a simple hacker than a good programmer like you, so hopefully I explained it well. :-)

Appreciate it if you can sort this out. It drives me a bit crazy. :-)

If you want to test it on my site then I'm more than happy to let you. Just let me know. Can you also let me know if you are unable to fix it or simply don't have the time? Then I might try to hack at it some more, but it probably takes me a year to do what you can in 30 min. :-P

Thanks,

JT