Index: nice_menus.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/nice_menus/nice_menus.module,v retrieving revision 1.50 diff -u -p -r1.50 nice_menus.module --- nice_menus.module 9 Aug 2008 12:52:40 -0000 1.50 +++ nice_menus.module 28 Aug 2008 18:56:18 -0000 @@ -312,6 +312,11 @@ function theme_nice_menu_tree($menu_name function theme_nice_menu_build($menu, $depth = -1) { $output = ''; //$output .= dpm($menu); + + $i = 0; + $count = count($menu); + $col_count = ceil( count($menu) / 7 ); + foreach ($menu as $menu_item) { $mlid = $menu_item['link']['mlid']; // Check to see if it is a visible menu item. @@ -323,18 +328,29 @@ function theme_nice_menu_build($menu, $d // Convert slashes to dashes. $clean_path = str_replace('/', '-', $clean_path); $path_class = 'menu-path-'. $clean_path; + + $extra_class = ' col'.($i%$col_count); + $i++; + if ($i==1) { + $extra_class .= ' first'; + } + elseif ($i==$count) { + $extra_class .= ' last'; + } + // If it has children build a nice little tree under it. if ((!empty($menu_item['link']['has_children'])) && (!empty($menu_item['below'])) && $depth != 0) { // Keep passing children into the function 'til we get them all. $children = theme('nice_menu_build', $menu_item['below'], $depth); // Set the class to parent only of children are displayed. $parent_class = $children ? 'menuparent ' : ''; - $output .= '