Drupal 视图 - 多个词汇参数/过滤器

发布于 2024-10-17 00:22:34 字数 666 浏览 5 评论 0原文

我正在尝试设置一个视图,该视图需要两个参数来自不同的词汇表并且遇到一些麻烦。

我有一个国家列表和一个主题列表,所以我想要这样的东西:

page/Argentina/25

这实际上似乎有效,因为我可以看到它正确地拉动了标题,但是它没有获取任何第二个参数节点就好像没有节点选择了该类别。

奇怪的是,当我显示每个节点的 TermID 字段时,它列出了第一个参数的 ID。我还可以在它给出的查询中看到这一点:

SELECT node.nid AS nid,
   node.title AS node_title,
   node.language AS node_language,
   node.vid AS node_vid
 FROM d6_node node 
 LEFT JOIN d6_term_node term_node ON node.vid = term_node.vid
 INNER JOIN d6_term_data term_data ON term_node.tid = term_data.tid
 WHERE (node.type in ('listings')) AND (term_data.name = 'Argentina') AND (term_node.tid = 25)

我认为这是有道理的,因为它只与第一项连接

这可能吗?

I am trying to setup a view that will need both arguments to be from different vocabularies and having some trouble.

I have a list of countries and a list of topics, so I would want something like this:

page/Argentina/25

This actually seems to work because I can see it pull the title properly, however it is not grabbing any of the 2nd parameter nodes as if no nodes have that category selected.

The strange thing is when I display the TermID field for each node, it lists the ID of the first parameter. I can also see this in the query it gives:

SELECT node.nid AS nid,
   node.title AS node_title,
   node.language AS node_language,
   node.vid AS node_vid
 FROM d6_node node 
 LEFT JOIN d6_term_node term_node ON node.vid = term_node.vid
 INNER JOIN d6_term_data term_data ON term_node.tid = term_data.tid
 WHERE (node.type in ('listings')) AND (term_data.name = 'Argentina') AND (term_node.tid = 25)

Which I think would make sense since it is only joining with the 1st term

Is this possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文