Index: menu_block.module =================================================================== --- menu_block.module (revision 111) +++ menu_block.module (working copy) @@ -659,7 +659,17 @@ } // Set a class if the link has children. if ($data['below']) { - $class[] = 'expanded'; + //check if the children links are not hidden + $shown = FALSE; + foreach ($data['below'] as $child) { + if (!$child['link']['hidden']) { + $shown = TRUE; + } + } + + if ($shown) { + $class[] = 'expanded'; + } } elseif ($data['link']['has_children']) { $class[] = 'collapsed';