$keys = strlen($keys) ? '/'. $keys : ''; foreach (module_implements('search') as $name) { $title = module_invoke($name, 'search', 'name'); $items[] = array('path' => 'search/'. $name . $keys, 'title' => $title, 'callback' => 'search_view', 'callback arguments' => array($name), // The search module only returns a title when the user is allowed to // access that particular search type. 'access' => user_access('search content') && $title, 'type' => MENU_LOCAL_TASK, ); if (arg(1) && $name == arg(1)) { $items[] = array('path'=> 'search/'. $name, type menucallback , copy other from from above } }