From 76ec835ba0e561eb42cf12779645286947c97895 Mon Sep 17 00:00:00 2001 From: webchick Date: Sat, 24 Mar 2012 00:26:41 -0600 Subject: Issue #1009832 by edb, chertzog, rjgoldsborough: Added menu name to breadcrumb on List Links page. --- modules/menu/menu.admin.inc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'modules/menu') diff --git a/modules/menu/menu.admin.inc b/modules/menu/menu.admin.inc index 5e8f08d57..226c3b005 100644 --- a/modules/menu/menu.admin.inc +++ b/modules/menu/menu.admin.inc @@ -260,6 +260,16 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) { // This is an add form, initialize the menu link. $item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => $menu['menu_name'], 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0); } + else { + // Get the human-readable menu title from the given menu name. + $titles = menu_get_menus(); + $current_title = $titles[$item['menu_name']]; + + // Get the current breadcrumb and add a link to that menu's overview page. + $breadcrumb = menu_get_active_breadcrumb(); + $breadcrumb[] = l($current_title, 'admin/structure/menu/manage/' . $item['menu_name']); + drupal_set_breadcrumb($breadcrumb); + } $form['actions'] = array('#type' => 'actions'); $form['link_title'] = array( '#type' => 'textfield', -- cgit v1.2.3