Problem/Motivation

The option to add database results only works with exposed filters. This will also mean that when you have other exposed filters available in the used view, these will be hidden.

It's better to use contextual filters so we don't need to render obsolete exposed filters and we can use the available contextual logic for the results.

Proposed resolution

Make it possible to use contextual filters besides exposed filters. Let the user decide if he wants to use exposed or contextual filters (based on the views settings).

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jonas139 created an issue. See original summary.

jonas139’s picture

Assigned: jonas139 » Unassigned
Status: Active » Needs review

I've added support for contextual filters. Some things to consider:

  • I've removed the initial render of the view on the page load because this is not necessary I think (it keeps working when removing this code)
  • The contextual filter has a higher hierarchy so when a contextual filter is used, the exposed filter method will be skipped
  • I've added some extra classes to determine in the JS which method has been used.
  • When multiple contextual filters are present, this probably will not work (depending on order of the filters) but I have not tested this yet.
wouters_f’s picture

Apparently i totally missed this.
Will look into this and merge, sorry for ignoring this