0

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.

Dustin
  • 4,314
  • 12
  • 53
  • 91

1 Answers1

2

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.

Community
  • 1
  • 1
TheodorosPloumis
  • 2,396
  • 1
  • 17
  • 31
  • So I thought I had this working this morning.. but I guess there's still some issues. When I do a search, it works fine. But then when I try to click a letter in the glossary it filters by the search term and the letter I clicked. Obvisouly that isn't going to work very well. I thought the Filter Harmonizer module would fix that problem but it did not :( How can I use Rules (or something else) to remove a parameter from the query string when I click on a glossary letter? – Dustin Dec 12 '13 at 22:11