0

I am trying to figure out the best way to add a panel page navigation item to the local task menu set.

I want to create a Panel Page with QuickTabs to build a simple UX for a non-drupal admin to updated and edit users for there events.

I can add the quick tabs etc. to the panel page, however, I am not sure how to add the menu item to the local task menu tabs.

So, when you edit an event here is what I want the menu to look like...

View | Edit | Panel Page

So, Panel Page is the new local task menu item for my panel page. I have been searching for a way and change not find it.

0

So, it took a while to figure what I needed was to add a custom local task navigation tab. To handle adding local task you need to learn the hook_menu() function, right after you learn to build your first hello world module. P.S. having the Test 1 and 2 menu items is what tells Drupal to create the outcomes tab.

/**
* Implementation of hook_menu().
*/
function outcomes_menu() {
  $items['node/%node/outcomes'] = array(
        'title' => 'Outcomes',
        'type' => MENU_LOCAL_TASK,
        'access arguments' => array('access content'),
  );
  $items['node/%node/outcomes/test1'] = array(
        'title' => 'Outcomes Test1',
        'type' => MENU_LOCAL_TASK,
        'access arguments' => array('access content'),
        'page callback' => 'drupal_get_form',
        'page arguments'=>array('drupalform_form1')
  );
  $items['node/%node/outcomes/test2'] = array(
        'title' => 'Outcomes Test2',
        'type' => MENU_LOCAL_TASK,
        'access arguments' => array('access content'),
        'page callback' => 'drupal_get_form',
        'page arguments'=>array('drupalform_form1')
  );

  return $items;
}

Hopefully, this helps someone else.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.