0

I have created a View with multiple page displays. I have specified one as the "default tab" and the other two as "tab" and they all display correctly together on a page similar to this:

alt text

I would like to be able to insert another tab onto this page with module generated code (not from a view). Is this possible?

markdorison
  • 139,374
  • 27
  • 55
  • 71

1 Answers1

0

Using the menu hook you can define another tab for the page similar to below:

function MODULENAME_menu() {
  $items = array();

  $items['PATH_TO_VIEW_DEFAULT_TAB/YOUR_NEW_TAB'] = array(
    'title' => 'TAB TITLE',
    'page callback' => 'FUNCTION NAME',
    'page arguments' => array('ACCESS ARGUMENT'),
    'access callback' => 'user_access',
    'access arguments' => array('ACCESS ARGUMENT'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10
  );
  return $items;
}
markdorison
  • 139,374
  • 27
  • 55
  • 71