Created
October 10, 2013 14:09
-
-
Save Soraph/6919007 to your computer and use it in GitHub Desktop.
Example for Tushar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function my_menu() { | |
$items['path/page'] = array( | |
'title' => t('Page title'), | |
'page callback' => 'mypage_callback_function', | |
'page arguments' => array('my','totally','optional','argumet','list'), | |
); | |
return $items; | |
} | |
// All your other module logic | |
function mypage_callback_function($one, $two, $three, $four, $five) { | |
//When the path "path/page" is requested the page callback function will | |
//use the 'page arguments' as arguments. | |
//Special care should be taken for the page callback drupal_get_form(), | |
//because your specific form callback function will always receive $form | |
//and &$form_state as the first function arguments. | |
//Vital information available here | |
// https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment