2

I am using the search_api module with views as the back-end. Users will have the ability to search through two different kinds of content, and there will be two separate views (one for each content type) to power the search results. I want to expose one search box, but then allow the user to direct those search terms to one view or the other.

Here is a picture that should make my desire more clear:

Search Bar

If the user selects "songbook", then their search gets directed to the song view. If they select "blog", then their search is directed to the blog view. How do I accomplish this using views?

3

Usually views with exposed filters use get params fx

example.com/view1?filter_a=search
example.com/view2?filter_b=search

If you create your own form then build the URL bases on input and search type it should work just fine. I don't think it will be possible to do a view selection with exposed filters.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.