I know how to pass one argument to a menu callback
$items['someaddress/%'] = array(
'title' => 'title',
'page callback' => 'some_function',
'page arguments' => 1,
'type' => MENU_CALLBACK
);
I don’t understand why the argument being passed is $_POST['nid'] but this works. It corresponds to page argument 1.
function some_function (){
$node = isset($_POST['nid']) ? node_load($_POST['nid']) : FALSE;
}
I’m now trying to pass multiple arguments. $items['someaddress/%/%/%'] = array( and is looking for a code sample of how I do that.
Thanks!
Use an array for
page arguments:You should always keep arguments passed to menu callbacks as an array, anyway.
FYI: the behavior you are seeing is how Drupal’s menu system is designed. The number corresponds to each argument being passed to the menu. 1 is the first argument, 2 is the second, etc.