Drupal 8
I have a content type with a field that holds a Taxonomy Term Reference
. I want a View that shows other nodes of the same content type that do not have that field with the same Taxonomy Term ID as the currently viewed node.
Example:
URL: /story/storyA
Currently viewing a node of Content Type Story
that has a Taxonomy Term Reference
to value B. I need the view to show other stories that do not have that same Taxonomy Term Reference
to value B.
I thought I could achieve that by
relationship
to the field that holds the Taxonomy TermFilter Criteria
of Term ID associated to above relationship and with operator is not equal to. PROBLEM: how do I get the token for Value?I also tried to go about adding a Contextual Filter
associated to the created relationship and selecting Exlude
but no dice.
I finally figured it out, I was missing the adequate additional Contextual Filter:
Term ID
, Provide default value
with Taxonomy term ID from URL
and the options Load default filter from node page
and limit terms by vocab
checked. And the last bit, in More
, I have Exclude
checked. This contextual filter is associated to the created relationship mentioned in the question.