[drupal-devel] param in middle of url?

Fabiano Sant'Ana listas at wundo.net
Fri Sep 30 19:48:06 UTC 2005


Yes,
You can use "func_get_args();" or just declare your callback like this:

/**
* Implementation of hook_menu().
*/
function example_menu($may_cache) {
 $items = array();
 $items[] = array('path'     => 'bar',
                  'title'    => t('example'),
                  'callback' => 'example_callback',
                  'access'   => user_access('access content'));
 return $items;
}

function example_callback($user_id,$bar) {
...
}

cheers,
Fabiano Sant'Ana

Aaron Stewart escreveu:

>Hey all..
>
>I want to do something like this:
>
>?q=foo/1/bar
>
>where "1" in this case is a user id (or rather, I want it to be a param
>into my callback).
>
>Is there a facility that already exists for doing this?
>
>Thanks,
>-=Aaron
>  
>




More information about the drupal-devel mailing list