By rusdvl on
Hi,
I'm running drupal 6 and trying to create a custom search. By custom i dont mean modifying the text or whatever. I need to add taxonomy terms as a drop down. So that users select a category in which to search in and then the text... Or they can select search in all categories.
Any help would be appreciated.
Cheers.
Comments
Hi rusdvl, You can use the
Hi rusdvl,
You can use the views module to create a custom search.
1) Create a new view
2) Set a filter called 'search terms'
3) Expose the filter
4) Make sure it isn't set to 'optional'
5) Set another filter called 'taxonomy terms'
6) Set it to 'drop down'
7) Select the vocabulary you want to use
8) Expose it
9) Set a sort criteria called 'search score'
10) Select the fields you want to feature (ie, node: title, node: teaser)
11) customize however you want with the page/block settings...
12) save
Thanks. I have a bit of an
Thanks.
I have a bit of an issue with this... I can see the two fields in the preview, but when I click save and allocate that block a place to sit in. (right sidebar) I cannot see the form. Both fields are exposed... so not sure why its not showing up... any ideas?
Here is the exported view:
set: Exposed form in block:
set:
Exposed form in block: Yes
and then add the block into your theme
thanks. that worked. but now
thanks. that worked. but now when i click search it just redirects me to the home page but doesnt display any results on its own page. is there something that im suppose to choose to make it go to its own search results page?
thanks ahead
UPDATE: I figured it out. Had to add a 'page' display to that view and give it a path, in my case 'ad-search/%'
sweeet, glad it all worked
sweeet, glad it all worked out for you.
Thanks
Thanks this is exactly what i was looking for.
thanks,but is it possible to
thanks,but is it possible to add one option name" all" within the select box to let user search entire taxomony rathan than just choosing 1 or more terms of the taxomony?
It has an automatic option of
It has an automatic option of < any > (that is if you made it optional and not mandatory). You can change the string to 'all' using the 'string replace' module.