From b4ed05d7b2e5471a115ce49ce069967627e8ba43 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Wed, 3 Nov 2010 21:23:14 +0000 Subject: [PATCH] When using the migration tool, remove the default "Home" link that is created by the standard install profile. git-svn-id: file:///tmp/wdn_thm_drupal/trunk@286 20a16fea-79d4-4915-8869-1ea9d5ebf173 --- sites/all/modules/unl/unl_migration.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sites/all/modules/unl/unl_migration.php b/sites/all/modules/unl/unl_migration.php index e8e9e129..6a87ea20 100644 --- a/sites/all/modules/unl/unl_migration.php +++ b/sites/all/modules/unl/unl_migration.php @@ -266,6 +266,17 @@ class Unl_Migration_Tool private function _createMenu() { + // Start off by removing the "Home" menu link if it exists. + $menu_links = menu_load_links('main-menu'); + foreach ($menu_links as $menu_link) { + if ($menu_link['plid'] == 0 && + $menu_link['link_title'] == 'Home' && + $menu_link['link_path'] == '<front>') { + menu_link_delete($menu_link['mlid']); + } + } + + // Now recursively create each menu. $primaryWeights = 1; foreach ($this->_menu as $primaryMenu) { $item = array( -- GitLab