2 column drop menu
Hi all
I'm currently creating a new website for the school that I teach at using montezuma. So far I'm managing to customise most aspects as I want but I'm struggling with the drop menu or level 2 items. I have one menu with a large number of items which when viewed on a notebook spreads off the bottom of the screen making the menu items inaccessible. What I want is to split a drop menu with over 10 items for example into 2 columns so that they are all visible on screen. Any ideas? Thanks |
you can always go to dashboard->appearances->menus and create the menu you want. Then by adding it into 'Theme position->menu1' it will display in the theme. You could break out the subpages however you want.
|
Quote:
|
Jerry, I'd like to see this php. Why don't you post it?
|
Quote:
First, I'd get a count of the submenu items. Then, assuming thynne.j1's idea of two columns if the count is over 10, I'd run a condition: Code:
if ($count > 10) Code:
style = "float:left; width:50%; white-space:normal;" Code:
else [submenu items echoed without any added style] Another, much simpler way, is to hard code a class for the two column dropdown into a template, and add the custom css for that class into the stylesheets. That way, it could be done with no php at all. The only thing that requires php is the condition of the number of menu items which, while you might not know exactly every time, you probably will have some idea if it will be many or few. I'd try that first. |
Thanks for all the replies - what a great, supportive forum
Jerry you have the nuts of what I want to do. I'll see if I can make sense of the coding. I'm not that familiar with php - on a learning curve! My dev site is www.trinitycatholiccollege.org.uk/index.php the offending long menu is curriculum - too many items for a low screen height |
I looked at your site, and it looks like you'll be able to tell which menu items will have many subs and which ones will have few. Therefore, you won't need to programically determine it, so you can skip the php.
Just make a special template, give the long submenu items, such as curriculum, a special class, and style those subs as two column dropdowns. When you figure this out, please post the code. Thanks. |
Here is another suggestion, why not grouping the subjects by discepline like
HTML Code:
Fine Arts HTML Code:
Fine Arts |
Makes sense providing curriculum leaders don't get upset about being catagorised into faculties :)
|
All times are GMT -6. The time now is 09:24 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.