Skip to content

Instantly share code, notes, and snippets.

@dasginganinja
Created January 26, 2015 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasginganinja/250ea037092998c02a2d to your computer and use it in GitHub Desktop.
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.
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
/**
* 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