Community & Support

Multiple search boxes on single page

Hi,

Is there a way for me to add more than one search box in my pages, and have their search limit to different content types per search box. Let's say have a search box that will search for the content type story, and another one, right below it, that will search in the custom content type "Biographies".

In short, I would like to have custom search boxes for different content types on the same page. I've looked into modules but didn't find any. So if you know a module to do so, or more of a good way to develop this feature, I'd be very grateful that you let me know! :-)

Thanks!

Comments

Any recommendation? A URL or

Any recommendation? A URL or related-topic would be welcome!

Thanks,

Not a solution, but...

I am interested to know how to do this as well. You may have seen this tutorial on how to restrict the search results to a specific content type based on the url of the page where the search bar shows up. The demo website has two search bars. I haven't gotten this working yet but if I do I'll return with more information.

In the meantime, hopefully someone will pick this up.

I'm curious as to what kind

I'm curious as to what kind of scenario would require this kind of setup. I don't think I've encountered it before :)

works at bekandloz | plays at technonaturalist

Well, it's all about theming

Well, it's all about theming the search box for different content types. I want the visitors to quickly identify what they will be looking for.

Such as a regular search box, and a file search box. In the end the files are just another content type, but the search box are there to inform visitors of "what they can search for" as much as searching for these.

A search box usually doesn't tell much of what you can search for, but different search boxes can let you know in an instant what kind of stuff you have on the website and get to it.

So, is there any way I could do this easily technically? I'm wondering whether I should create a module for that or just a little bit of theming in page.tpl.php could do the trick.

thanks

Have you checked out what

Have you checked out what Views can do? You may be able to cobble something together with it, edit the search form so people can select with radio button or checkbox or something to limit the search to the selected categories, and then use the view to present the search results. Sorry I can't be any less vague, I'm a Views noob that finally worked out how to put together a decent looking user profile so I'm theorising from what I've seen in there while naffing round :)

works at bekandloz | plays at technonaturalist

I have to look into Views

I have to look into Views yes. But Views only allows you to display a filter box right? It can only search into one field, it's different than the search API.

Please correct me if I'm wrong.

Gonna have to hope someone

Gonna have to hope someone else can answer that one, I have no idea sorry :S

works at bekandloz | plays at technonaturalist

This URL may help too.

This URL may help too. That is, in addition to this one. Will return if I make any progress...

Found a solution

6 months later... I found a post that outlines an easy way to do this. I put explicit instructions into my comment.

nobody click here