Skip to content

Instantly share code, notes, and snippets.

@drupalista-br
Created December 6, 2012 09:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save drupalista-br/4223234 to your computer and use it in GitHub Desktop.
Save drupalista-br/4223234 to your computer and use it in GitHub Desktop.
Drupal 7 Profile2 Custom User Tab Form ( MYMODULE.module )
<?php
/**
* Implements hook_menu().
*/
function MYMODULE_menu() {
// MYCUSTOMPATH can't be the world 'profile'
$items['user/%user/MYCUSTOMPATH'] = array(
'title' => 'Profile',
'description' => 'User Profile2',
'page callback' => 'drupal_get_form',
'page arguments' => array('MYMODULE_load_profile2_MYPROFILE2TYPE_form', 1),
'access callback' => TRUE,
'access arguments' => array(1),
'type' => MENU_LOCAL_TASK,
'file' => 'MYMODULE_profile2_MYPROFILE2TYPE.inc',
);
return $items;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment