Fix for Easy Secondary Tabs

  1. function testmodule_menu() {
  2.   $items['user/%user/info'] = array(
  3.     'page callback' => 'test_info',
  4.     'title' => 'Info',
  5.     'parent' => '',
  6.     'type' => MENU_LOCAL_TASK,
  7.     'access callback' => TRUE
  8.   );
  9.    
  10.   $items['user/%user/info/view'] = array(
  11.     'page callback' => 'test_info_view',
  12.     'access callback' => TRUE,
  13.     'type' => MENU_DEFAULT_LOCAL_TASK,
  14.     'tab_parent' => 'user/%user/info',
  15.     'title' => 'View'
  16.   );
  17.  
  18.   $items['user/%user/info/edit'] = array(
  19.     'page callback' => 'test_info_edit',
  20.     'access callback' => TRUE,
  21.     'type' => MENU_LOCAL_TASK,
  22.     'tab_parent' => 'user/%user/info',
  23.     'title' => 'Edit'
  24.   );
  25.  
  26.  
  27.    
  28.    return $items;
  29. }
  30.  
  31.  
  32. /**
  33.  * Callback info
  34.  */
  35. function test_info() {
  36.   return t('This is the info page');
  37. }
  38. /**
  39.  * Callback info_view
  40.  */
  41. function test_info_view() {
  42.   return t('Here it should be view');
  43. }
  44. /**
  45.  * Callback for info_edit
  46.  */
  47. function test_info_edit() {
  48.   return t('Here it should be the same for edit');
  49. }

Submit Fix

Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Select the syntax highlighting mode to use.