=== modified file 'includes/menu.inc' --- includes/menu.inc 2010-11-07 21:51:40 +0000 +++ includes/menu.inc 2010-11-14 16:37:29 +0000 @@ -1207,6 +1207,7 @@ function menu_tree_page_data($menu_name, $tree_parameters['expanded'] = $active_trail; $tree_parameters['active_trail'] = $active_trail; } + drupal_alter('menu_tree_page_data_parameters', $tree_parameters, $cid); // Cache the tree building parameters using the page-specific cid. cache_set($cid, $tree_parameters, 'cache_menu'); } === modified file 'modules/system/system.api.php' --- modules/system/system.api.php 2010-11-13 02:00:56 +0000 +++ modules/system/system.api.php 2010-11-14 16:37:24 +0000 @@ -1186,6 +1186,20 @@ function hook_translated_menu_link_alter } /** + * Alter the current page menu tree parameters. + * + * @param $tree_parameters + * See menu_build_tree() for the description of this array. + * @param $cid + * The cache id for these parameters. Add your identifiers separated by + * colons as necessary. + */ +function hook_menu_tree_page_data_parameters_alter(&$tree_parameters, &$cid) { + // Only show the three levels of the menu. + $tree_parameters['max_depth'] = 3; +} + +/** * Inform modules that a menu link has been created. * * This hook is used to notify modules that menu items have been