Drupal will pass any additional URL elements as additional parameters to your hook_menu
callback function - use func_get_args() in your callback to get them.
So if you register only one wildcard display/page/%
, but the actual request has two additional elements display/page/3/andOrderBy/Name
, your callback will be passed '3' as an explicit parameter, but also 'andOrderBy' and 'Name' as implicit additional ones.
Example callback:
function yourModuleName_display_callback($page_number) {
// Grab additional arguments
$additional_args = func_get_args();
// Remove first one, as we already got it explicitely as $page_number
array_shift($additional_args);
// Check for additional args
if (!empty($additional_args)) {
// Do something with the other arguments ...
}
// other stuff ...
}