Created
January 26, 2015 18:14
-
-
Save dasginganinja/250ea037092998c02a2d to your computer and use it in GitHub Desktop.
Drupal 7 hook_menu local task troubles. Trying to add a local task to import/sales_person_importer/prepare_csv.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feeds Paths: | |
Feeds Import -> import/%/ path definitions -> http://cgit.drupalcode.org/feeds/tree/feeds.module#n293 | |
Feeds UI -> admin/structure/feeds/% path definitions -> http://cgit.drupalcode.org/feeds/tree/feeds_ui/feeds_ui.module#n46 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_menu(). | |
*/ | |
function km_hydraulics_sales_directory_menu() | |
{ | |
$items = array(); | |
$items['import/sales_person_importer/prepare_csv'] = array( | |
/* Doesn't show in the menu tasks */ | |
'title' => 'CSV Prep', | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('km_hydraulics_sales_directory_form_prepare'), | |
'access callback' => TRUE, | |
'type' => MENU_LOCAL_TASK, | |
); | |
$items['admin/structure/feeds/sales_person_importer/prepare_csv'] = array( | |
/* Shows in the list of menu tasks */ | |
'title' => 'CSV Prep', | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('km_hydraulics_sales_directory_form_prepare'), | |
'access callback' => TRUE, | |
'type' => MENU_LOCAL_TASK, | |
); | |
return $items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment