I posted a comment here. Putting it here as well in case no-one reads those pages ever. ;)
I havent actualy tried Drupal 6 at all yet, I'm was just looking over the docs to see what I need to do to keep my modules working and I was totaly beffudeled about the new menu system.
It seems to me that there is no way (no clear and properly described way) to get the old menu behaviour where a page handler would get all the extra bits of the url requested as arguments. I.e. if I have an url handler for 'cards' and the visitor goes to 'cards/banans/monkeys/apples/horses' the page handler would get 4 arguments with 'bananas', 'monkeys', 'apples' and 'horses'.
I get that you can specify a wildcard with %, and that you can then say that your page handler wants the n'th % as an argument by putting numbers (or is it arg( number )?, not to clear on that either) in the arguments array. But what if I dont know the number of arguments I want before hand?
Comments
Wildcard not needed
Hi, I was curious about this too, and had come across your comment on the other post and was planning to reply to it... but now it seems that the comment is no longer there. So I'll reply here for anyone who may be interested ;)
I did some research and testing, and the answer is that this actually works in a similar way as in Drupal 5. You can just define
in hook_menu(), and Drupal will still pass in anything appended to that path as arguments. So if you go to www.example.com/cards/bananas/monkeys/apples/horses and use func_get_args() inside the your_function() callback, you will get
array('bananas', 'monkeys', 'apples', 'horses').The only reason for using the wildcards is to have more fine-grained control over when the path gets called. If you had defined the path as 'cards/%' instead, then going to www.example.com/cards/rest/of/the/path will send you to the function as before, but going to www.example.com/cards will give you a "page not found" error.
Aahaaa, awesome.
Aahaaa, awesome. Thanks.
--"I have no responsibility what so ever."