Other View Filter
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
Frequently two views, or two displays of one view, occur on the page together. One common example is a listing of content with a few curated items selected via more specific criteria. It's simple enough to create two displays and show the curated one above the general listing. This presents a problem: content that appears in the curated list needs to somehow be excluded from the general listing.
The filter provided by this module can be used to exclude a node or multiple nodes from a view, by excluding the results of one view from another one. This allows you to filter a view by another view.
A couple of other projects have taken a stab at solving this problem:
- Views Exclude Previous
- Views Pipes (sandbox)
- Views Field View
- Views Filter View - very similar.
- attempts to determine what content has already been loaded on thep age, whether by views or by some other method, and exclude that from the current view
- does some fancy stuff with contextual filters and configuration settings
- similar concept to this, but using a field handler rather than filter handler, allowing you to embed a view as a field in a view.
This module takes a simple Views filter approach. Using it is easy:
- In the view from which you wish to exclude selected items, add filter "Content: Other view result"
- Select the view/display combo whose output you want to exclude from the current view.
- Save the view.
To minimize the cost to performance of running multiple views queries, the number of instances of this filter on the same display should be kept to a minimum and caching should be employed liberally. Views Content cache and Cache Actions are helpful for this.
This has only been tested on nodes, managed files, and users. It isn't yet compatible with other entity types.
