Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Montezuma Theme »

2 column drop menu


  #1  
Old Feb 5, 2013, 04:54 PM
thynne.j1
 
7 posts · Feb 2013
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
  #2  
Old Feb 5, 2013, 06:13 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
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.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Last edited by juggledad; Feb 6, 2013 at 11:17 AM.
  #3  
Old Feb 5, 2013, 06:41 PM
jerryc
 
367 posts · Oct 2012
Florida
Quote:
Originally Posted by juggledad
you can always go to dashbaord->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.
That sounds like a much better solution to me. Making the submenus 2 columns wide, conditioned upon the number of entries, would take a higher level of PHP than would be best to post on this forum.
  #4  
Old Feb 5, 2013, 07:38 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Jerry, I'd like to see this php. Why don't you post it?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Feb 5, 2013, 08:37 PM
jerryc
 
367 posts · Oct 2012
Florida
Quote:
Originally Posted by juggledad
Jerry, I'd like to see this php. Why don't you post it?
Well, first of all, I'm not using drop down menus, so I don't know all the code, but here's the concept as I'd approach it. It would require this advanced technique, including some significant output buffering (if it would even work at all).

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)
then echo each submenu item li styled with:

Code:
style = "float:left; width:50%; white-space:normal;"
(just like categories are laid out in a mz widget, and they'd have to be in some kind of container div, so that the 50% would have some meaning. The white-space:normal style makes them wrap if they're too long; with the default mz styling, menu items don't wrap.)

Code:
else [submenu items echoed without any added style]
I hope this helps. It's only at the level of a sketch on the back of a napkin.

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.
  #6  
Old Feb 6, 2013, 01:02 AM
thynne.j1
 
7 posts · Feb 2013
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
  #7  
Old Feb 6, 2013, 01:47 AM
jerryc
 
367 posts · Oct 2012
Florida
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.

Last edited by jerryc; Feb 6, 2013 at 01:50 AM.
  #8  
Old Feb 6, 2013, 04:37 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Here is another suggestion, why not grouping the subjects by discepline like
HTML Code:
Fine Arts
  Art
  Drama
  Music
Science and Engineering
  Science
  Technology
so the first level would only have
HTML Code:
Fine Arts
Science and Engineering
easy to do, easy to maintain, no coding needed.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #9  
Old Feb 6, 2013, 11:15 AM
thynne.j1
 
7 posts · Feb 2013
Makes sense providing curriculum leaders don't get upset about being catagorised into faculties

Last edited by juggledad; Feb 6, 2013 at 11:22 AM.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Seamless drop shadow on bottom of center column 86owen Center area post/pages 15 Sep 7, 2012 04:15 AM
Details about centering the menu on menu bar (child drop-down menus become unalligned jstein Page & Category Menu Bars 2 Oct 24, 2010 10:56 AM
Can I have long drop down menus show in shorter table/column format? Masselyn Page & Category Menu Bars 4 Oct 12, 2010 08:15 PM
Drop shadow in center column kal Header configuration & styling 6 Jun 18, 2009 08:39 PM


All times are GMT -6. The time now is 03:02 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.