views:

360

answers:

2

Currently I have a custom module with hook_menu for path 'search'. It's working just fine. However, it couldn't process the request when I access /search?q=something.

How do I do this? I'm using Drupal 6 btw.

Thanks

A: 

Change to http://site/search?s=something (fox example, q already used by drupal)...

Nikit
+1  A: 

I bet your problem is that q is what drupal internally uses to parse the path. So

/search?q=something

will be translated internally into

/something

which is an entirely different page than the one you defined in your hook_menu. If you instead did

/search?p=something

it should work.

googletorp
Thanks a lot dude!
Ferry

related questions