It turned out to be non-trivial to modify the core search block to include a taxonomy selector - even though the 'advanced search' functionality is available.

Although I searched a handful of issues and found only themeing stuff, (and a recipe using views) in the end, I desconstructed the search form and came up with the following mini module

http://cvs.drupal.org/viewvc.py/drupal/contributions/sandbox/dman/search...
Just install, enable core search block, and optionally choose a vocab on the admin/settings/search page.

screenshot of a simple search block + taxonomy
Surely this is a pretty common website feature these days?

In the spirit of Publishing an RFC for new modules I would like to submit this feature for comment. I have the feeling (indeed I hope) that there may well be a simple or already-existing solution out there.

Please suggest alternative approaches, give it a code review, test or criticize. I basically butcher the search block form.
Heck, maybe I should have created a stand-alone form rather than remade the core one. Suggestions?
This job was such a frustrating exercise (compared to how easy most form_alter jobs are) that I think it's worth putting forward as a project to save someone else the pain.

Please vote yay or nay whether this is worth yet another module project - or suggest a better home. tweakbox?

Comments

jweberg’s picture

I have created the module Custom Search Box. Please take a look. I think it would be a great feature to roll in with my existing module. I have some other functionality I plan on adding, including a request for something similar (see issues queue.) Please let me know what you think.

Justin

socialnicheguru’s picture

this seems like it should be a core feature almost.

I have been trying to think how do I search via taxonomy especially since I have put so much time into categorizing my site.

Chris

http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.