1

I have various views that show a limited range of nodes. For example going to collections/country-animals shows nodes with the taxonomy term 'country-animals'.

I have exposed filters enabled on these views, but unfortunately using an exposed filter rewrites the whole URL ignoring the fact that the user was viewing 'country-animals' and wishes to refine the current view by the terms selected. For example refining by 'gold' rewrites the URL to taxonomy/term/all?field_classification_metals_tid[]=89 and shows all nodes with the taxonomy term of 'gold' instead of nodes with the taxonomy term of 'gold' and 'country-animals'.

If I take the URL of the page I was on and combine it with the end of the URL that exposed filters creates (collections/country-animals?field_classification_metals_tid[]=89) I get exactly the view I want all the 'country animals' refined by 'gold'.

How do I make the exposed filters use the correct URL automatically instead of starting each URL with 'taxonomy/term/all'?

I get the same results with and without better exposed filters.

Here is the view settings page: view settings

I am using Drupal 7 and Views 7.x-3.7

1

Assuming Drupal 7.x and Views 3.x.

Edit the View. In the filter config, make sure the "Allow multiple selections" option is ticked. Without that, you've configured the filter to only allow a single option per filter.

If "country-animals" is setup as a contextual filter, you'll need a patch from this issue to allow multiple terms.

Hope that helps.

  • Thank you mikeker. I went and learned git so I could apply the patch from comment #36 in the link you supplied. Applying the patch went OK. I checked that I had "Allow multiple selections" ticked in the contextual filter 'Content: Has taxonomy term ID (with Depth)'. Unfortunately the results I am getting are still the same. Is there anything else you can suggest? – Paul Trotter Dec 12 '13 at 12:55
  • I had the Better Exposed Filters module on and had my filters in a block provided by this module. I had tried turning off Better Exposed Filters before I posted this question and it hadn't helped. However since applying the patch I have turned off the Expose Filters in a block option, so the filters now display above the view like normal. Having done this everything works as I would like it to, and this issue is now solved. – Paul Trotter Dec 13 '13 at 10:56

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.