[英]View: Exclude nodes that have the same taxonomy term id(s) as current node
Drupal 8 Drupal 8
I have a content type with a field that holds a Taxonomy Term Reference
. 我有一个内容类型,其中的字段包含“
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. 我想要一个视图,以显示具有相同内容类型的其他节点,这些节点没有与当前查看的节点具有相同分类标准项ID的字段。
Example: 例:
URL: / story/storyA URL:/ 故事/ storyA
Currently viewing a node of Content Type Story
that has a Taxonomy Term Reference
to value B . 当前正在查看
Content Type Story
的节点,该节点的Taxonomy Term Reference
为值B。 I need the view to show other stories that do not have that same Taxonomy Term Reference
to value B . 我需要显示其他故事, 这些故事没有与B相同的
Taxonomy Term Reference
。
I thought I could achieve that by 我以为我可以做到
relationship
to the field that holds the Taxonomy Term relationship
保存分类法术语的字段建立relationship
Filter Criteria
of Term ID associated to above relationship and with operator is not equal to . Filter Criteria
。 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. 我还尝试着添加与创建的关系相关联的
Contextual Filter
,然后选择Exlude
但没有骰子。
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. Term ID
, Provide default value
其中包含Taxonomy term ID from URL
以及选项Load default filter from node page
并limit terms by vocab
选中limit terms by vocab
。 And the last bit, in More
, I have Exclude
checked. More
,我已经检查了Exclude
。 This contextual filter is associated to the created relationship mentioned in the question.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.