Fix for Secondary Tabs

  1. function MyModule_menu() {
  2.         $items['user/%user_uid_optional/info'] = array(
  3.     'title' => 'Info',
  4.     'page callback' => 'user_view',
  5.     'page arguments' => array(1),
  6.     'access callback' => 'user_view_access',
  7.     'access arguments' => array(1),
  8.         'parent' => '',
  9.         'type' => MENU_DEFAULT_LOCAL_TASK,
  10.     'file' => 'user.pages.inc',
  11.     );
  12.        
  13.         $items['user/%user/info/view'] = array(
  14.     'title' => 'View',
  15.     'type' => MENU_DEFAULT_LOCAL_TASK,
  16.     'weight' => -10,
  17.   );
  18.  
  19.   return $items;
  20. }
  21.  
  22. function surf_menu_alter(&$items) {
  23.         unset($items['user/%user/view']);
  24. }

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.