Question

I have a glossary view, which is just the one that comes with Views. I want to allow users to filter the results by taxonomy terms (dropdown) and also by title (search field). The problem I'm running into is that when I click on a glossary letter (e.g. X) then I try to type in a search term that begins with something other than X (e.g. Cat) I get no results. The title search filter is basically just searching within the selected letter in the Glossary. So if I'm on the X page and I search for Cat nothing is found. If I would search for X-ray then that would appear.

Is there any way to make the title filter relatable to the entire view result and not just things that begin with the glossary letter than I have selected?

In the attachment of the view I've tried turning on the "Inherit exposed filters" option but that does not help.

Was it helpful?

Solution

This happens because the view has already a Contextual Filter in use that is filtering the query from the path arguments. That means that the exposed filter is adding a filter after the main filter from the path.

First of all, enable the "Show the SQL query" option on your views settings (admin/structure/views/settings). This way you will be able to see immediately what is going on.

Furthermore, you can set the contextual filter for the title for the Page views as

  • "WHEN THE FILTER VALUE IS NOT IN THE URL -> Display all results for the specified field" because by default it shows titles beginning with letter "a" in the first load.

So to achieve this you should remove any path argument that exists in the path due to the contextual filter (eg for the domain.com/l?title="some title here" you must have domain.com/?title="some title here", without the "l").

You could do this with the following methods:

And the winner is probably the filter_harmonizer module.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top