The current implementation of search_menu places the implementing module name in the path. Examples are search/node and search/user. This has several implications. First, there is no control over this path, ie no way to say that content search should be search/content (let's ignore hook_menu_alter here), and second, there is no way for 1 module to define multiple search paths and handle them.

My proposed solution is to let hook_search return its path(s) in a new $op, called 'paths'.

Comments

robertdouglass’s picture

Related issue that suggests the path and the searches available should be returned as structured data:
http://drupal.org/node/239133

mdupont’s picture

What's the actual status on the issue?

jhodgdon’s picture

Status: Active » Closed (duplicate)

Let's just have one issue, and I think the other one is more comprehensive.

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Category: bug » feature

On second thought, I guess these are two separate issues. Anyway, neither made the feature request list for Drupal 7...

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Closed (duplicate) » Closed (fixed)

Actually, this was fixed in Drupal 7: hook_search_info() does allow you to define your path.
That other issue remains.