Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
In some situations or requirements, one needs to combine OR and AND logic on their contextual filters.
Proposed resolution
Add the ability to combine AND and OR logic to contextual filters like it's done on standard views filters.
Comments
Comment #2
jukka792 CreditAttribution: jukka792 as a volunteer commentedThis is needed! Thanks
Comment #3
chrisck CreditAttribution: chrisck commented+1 for this much needed feature!
Comment #4
maxilein CreditAttribution: maxilein commentedYou can achieve that when you are using tokens on views filter using
Tokens in Views Filter Criteria
and maybe also this module: https://www.drupal.org/project/token_filter
Comment #5
cballenar CreditAttribution: cballenar commentedI'm also interested in this. It's not even clear what the default behavior is. Forums seem to indicate "AND" to be the default.
Comment #6
chrisck CreditAttribution: chrisck commented@maxilein Your suggestion may not work for everyone. In our case we are needing flexibility around AND/OR logic around the contextual filter from fields of the current entity.
Token filter does not have a token for field values for current page.