2

There are quite some threads about it, but none seems to do the job for me.

I'm using a better exposed filter on a view, and I'm trying to build a link that would expose the results by a query in the url.

Eg: domain.com/myview?filter=term-id

Why am I looking for this? When I use the regular approach (using Taxonomy display) it would use an url like this domain.com/myview?filter=some-stuff, and the exposed filter wouldn't work anymore but for the terms specified in the url. All the possible results are limited to what's in the url, while it should be able to filter on all the results, regardless of what's in the url.

In my console I found something like this when I'm using the exposed filters: domain.com/en/views/ajax?field_sector_tid=6

I wish I could translate that behaviour to an url. Anyone ha an idea how I can achieve this please?

2 Answers 2

2

If I understood well, once I face the same situation than you, the module Views Filter Harmonizer help me to solve my issue.

From the module's page:

Views Filter Harmonizer solves an operational foible with the Views module regarding filtering.

Normally, when a Views field has been assigned both an exposed filter and a contextual filter, then both filters get applied to the View's results set -- always. This is not configurable behaviour. It's hard-coded.

3
  • Thanks, I enabled the module and followed the steps on the project page, but there's no option such as Override the companion contextual filter (as described on the project page). I even searched the source of that view configuration page. The module is enabled though. Edit: Oops, used the wrong filter. It only applies on filters like Has taxonomy terms (with depth) apparently… Aug 19, 2015 at 6:42
  • Edit 2: Workage! Thank you, so much appreciated, ivan! It plays well with Better Exposed Filters and Taxonomy display modules. Aug 19, 2015 at 6:53
  • Great! , glad i could help
    – ivan
    Aug 20, 2015 at 6:21
0

It looks like you can combine exposed and contextual filters using this module: https://www.drupal.org/project/filter_harmonizer

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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