By clivesj on
I have a link with a class use-ajax:
rehearsal/set_stage/nojs/val1/val2/val3
It is succesfully translated by ajax to:
rehearsal/set_stage/ajax/val1/val2/val3
hook_menu:
$items['rehearsal/set_stage'] = array(
...
'page callback' => 'rehearsal_set_stage',
//'page arguments' => array(0,1,2,3,4,5),
'type' => MENU_CALLBACK,
);
function rehearsal_set_stage($ajax, $val1, $val2, $val3) {
}
when i pass rehearsal/set_stage/ajax/foo/bar/moo, i would like the function to be called with
function rehearsal_set_stage('ajax', 'foo', 'bar', 'moo'){}
however the only arguments sent to the function are: foo, bar, moo.
regardsless of the setting of page arguments.
I would expect:
'page arguments' => array(2),
to do it, but it doesn't.