[drupal-devel] generate random urls
I'm trying to make the glossary have a page per letter 'glossary/a', 'glossary/b' etc... I'd even like to have every link available before hand, even if isn't content to a given letter. So a need glossary/[0-9a-z]. Is there other way to achieve this than to have a very big array with every case inside the hook_menu? Regards, maykel -- ,''`. Debian GNU/Linux : :' : The universal & free Operating System `. `' El Sistema Operativo universal y libre `- http://www.debian.org/
Maykel Moya wrote:
I'm trying to make the glossary have a page per letter 'glossary/a', 'glossary/b' etc...
I'd even like to have every link available before hand, even if isn't content to a given letter.
So a need glossary/[0-9a-z]. Is there other way to achieve this than to have a very big array with every case inside the hook_menu?
Regards, maykel
yes - you just need a handler for 'glossary'. additional arguments get passed automatically. so your function might be: function glossary_page($letter = NULL)
On Mar 29, 2005, at 11:33 AM, Moshe Weitzman wrote:
Maykel Moya wrote:
I'm trying to make the glossary have a page per letter 'glossary/a', 'glossary/b' etc... I'd even like to have every link available before hand, even if isn't content to a given letter. So a need glossary/[0-9a-z]. Is there other way to achieve this than to have a very big array with every case inside the hook_menu?
yes - you just need a handler for 'glossary'. additional arguments get passed automatically. so your function might be:
function glossary_page($letter = NULL)
More information here: http://tinyurl.com/64nqs -- Jonathan Chaffer Applications Developer, structure:interactive (616) 364-7423 http://www.structureinteractive.com/
> So a need glossary/[0-9a-z]. Is there other way to achieve this than to > have a very big array with every case inside the hook_menu? 1. have a function in hook_menu returning the array 2. parse the arguments in the menu callback
participants (4)
-
Jonathan Chaffer -
Maykel Moya -
Moshe Weitzman -
Vladimir Zlatanov