Drupal 7 视图按节点的分类术语过滤
我有一个与上一个类似的问题(Drupal 7 视图按动态过滤分类学术语),情况正好相反。
我有一个“合作伙伴”内容类型,每个内容类型都有自己的分类术语。另一种内容类型是包含“合作伙伴”词汇表中的多个术语的常规页面。在我的常规节点中,我想在视图块中包含一些“合作伙伴”。
该视图应仅过滤那些相关的合作伙伴节点(那些标有常规节点标签之一的节点)。
可以这样吗?问题是我无法通过上下文过滤器从 URL 获取术语名称...
I have a similar question to my previous one (Drupal 7 views filter by dynamic taxonomy term), it's only the other way round.
I have a "partner" content type, each with it's own taxonomy term. The other content type is a regular page with multiple terms from the "partner" vocabulary. In my regular nodes, I want to include a few of the "partners" in a view block.
The view should filter only those relevant partner nodes (those tagged with one of the regular node's tags).
Could it be done this way? The problem is that I can't get the term names from URL via contextual filters...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过整个下午的谷歌搜索(并将其发布在那里),我最终找到了答案。
它基于 scito.ch(谢谢),仅进行了一些修改。在
内容:具有分类术语 ID(带深度)
过滤器上,请务必选中允许多个值
复选框。另外(对此有很多错误的说法),不要在WHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED
中指定任何内容。指定所有这 3 个上下文过滤器非常重要。希望这可以帮助某人并为他节省一个阳光明媚的下午:)
After googling the whole afternoon (and posting it there), I eventually found the answer.
It's based on a tutorial on scito.ch (thanks), with only a few modifications. On the
Content: Has taxonomy term ID (with depth)
filter, be sure to check theAllow multiple values
checkbox. Also (there's a lot of wrong tuts for that), don't specify anything in theWHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED
. It's important you specify all those 3 contextual filters.Hope this helps someone and saves him a sunny afternoon :)