[support] D6 hook_menu
Earnie Boyd
earnie at users.sourceforge.net
Thu Mar 19 12:19:57 UTC 2009
Quoting Fred Jones <fredthejonester at gmail.com>:
> I have looked through the docs about this but I don't understand how
> this works. I want to send URLs of the type foo/% and also foo/%/% to
> the same function, but it seems to me that I must use
>
> $items['foo/%'] = array(
>
> and
>
> $items['foo/%/%'] = array(
>
> Using just one or the other is failing for me. Am I missing something
> or is this how it must be done? Two different items?
>
Yes, that is how it's done. For the sample you give above you also
want to pass 'page arguments' => array(1) to the foo/% item and 'page
arguments' => array(1, 2) to the foo/%/% item.
--
Earnie http://r-feed.com
Make a Drupal difference and review core patches.
-- http://for-my-kids.com/ -- http://www.4offer.biz/
More information about the support
mailing list