Is it possible with Drupal to create a seperate search field to search in a custom field for a specific content type?

For example I have a text field in a content type with the name keywords. I gave some important keywords for that specific node.

What I want is that a user can search through these words with a custom search field, that is displayed on a specific page.

I know I could use something like exposed filters in views, but it is not working in my case. The reason is the nodes are having a relationship with a taxonomy list. The nodes are showing based on the taxonomy term ID in the URL.

For example, my taxonomy list called 'Jobs'. The terms in the list are 'sanitary', 'interior' and 'garden'.

When I'm on the page with the sanitair, there is a search field. If I search in this field it should take a look for all the nodes not only the nodes that are related with the 'sanitair' term. If I used exposed filters the filter is only searching on the current term, so only the kind of jobs for 'sanitair' are showing up.

Is there a way to do this with or without views and is it also possible to create this search field in a block, so I can use it on different places?



You could:

  • create a new separate view for searching across all nodes and display it in a block on the taxonomy term page, or
  • use solr search and set up facets (requires a lot of setup)

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.