Excluding the current node from a display with related items is fairly straight forward. However, in my case there's already another contextual filter (NID) in the game for other purposes.

Adding the exclude functionality on the existing contextual filter isn't working, so I guess an extra contextual filter should be applied in this case. However, simply adding another contextual filter (NID) that's configured to exclude the current node results in no items at all (that moment when you're confronted with the lack of grouped AND or NOT filters for contextual filters).

This situation doesn't feel very unusual to me, so I guess there must be a correct approach for this. My guess is that something must be done with the already existing contextual filter, but can't seem to figure out what exactly.

Can anyone help?

2 Answers 2


What are the "other purposes" of the first nid contextual filter? Are you taking in the current nid in order to build a relationship to something like a taxonomy term to then get other nodes in the same term?

If so, then the contextual filters should be using different relationships.


https://www.drupal.org/project/views_exclude_previous maybe a useful module to consider for this purpose.

It statically caches any previously loaded NIDS on the page and excludes them from displaying in lists.

Your Answer

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

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