Just a question. I'm a PHP programmer but I've never used Drupal API. I have defined a search environment with faceted search that works like a charm (great module!).
Now, I want to replace the regular search box, the one that is rendered in the templates with
print $search_form
I'm already using the keywords search block. What I want now is to make the regular search box (which is in the header, not in a block) work as a simplified keywords search box. I can make changes in the theme or implement any hook or whatever. I don't need a cross-theme or cross-installation solution.
I've tried a dirty hack and a very dirty hack, but they didn't work (problems with drupal forms, tokens and this kind of things).
Can somebody give me some example code?
Thank you very much in advance.
Comments
Comment #1
SlipAngel commentedLooking for a solution to the same problem. Found a thread in the search group looking for a similar solution as well, but the code looks like it creates a custom block, not override the default search form.
Simply knowing how to call a faceted search form via PHP would be enough. I'm sure I can handle any theming beyond that.
Comment #2
Countzero commentedI faced the same problem, and choosed to override the submit function of the default search form, setting the redirect property :
hook_form_alter :
Somewhere in the module :
Not ideal, I guess, but efficient and seemless.
Hope it helps
Comment #3
chicagowebman commentedLooking for a solution to the same problem as well. Not sure where or how to implement the code/solution above (#2). Can someone/anyone provide more details to get this to work?
Comment #4
Countzero commentedYou have to create a module of your own and put the code above in it.
http://drupal.org/node/206753