在 Drupal 中使用显示层次结构值的分类参数创建视图

发布于 2024-09-11 17:44:49 字数 222 浏览 7 评论 0原文

我正在尝试使用分类论证使我的观点正常工作。我的分类法有一个层次结构,因此如果我提供主要分类术语(具有各种子术语),我希望它显示主术语加上所有子术语的结果。然而,目前它只提供主项的结果,不包括子项。

因此,我有一个术语:“项目管理”,然后是子术语:“后续步骤”、“筹款”等。当我使用“项目管理”参数显示视图时,它不会列出使用“后续步骤”或“筹款”条款。当明确给出该参数时,它仅显示“后续步骤”项。

I'm trying to get my view to work correctly using a taxonomy argument. My taxonomy has a hierarchy so if I supply the main taxonomy term (which has various sub-terms), I want it to show results for the main term plus all the sub-terms. However, at the moment it is only supplying results for the main term and excludes it's sub-terms.

So, I have one term: "Project Management", then sub-terms: "Next Steps", "Fundraising", etc. When I show the view with the "Project Management" argument it doesn't list any items found with the "Next Steps" or "Fundraising" terms. It only shows the "Next Steps" items when that argument is explicitly given.

Ben

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我的黑色迷你裙 2024-09-18 17:44:49

您需要使用的分类参数是分类:术语 ID(带深度)

当您添加该参数并查看其单独的配置窗口时,您应该在底部看到一个标题为“深度”的小选择下拉列表。设置您想要包含在结果中的子项的深度。

作为参数,输入您知道具有用其子术语标记的节点的任何分类术语 ID,您将看到包括参数和所有子术语的结果。

我自己忘记了执行此操作的确切方法,但它概述了 在此网站上

The taxonomy argument you need to use is Taxonomy: Term ID (with depth).

When you add that argument and look at its individual configuration window, towards the bottom you should see a small select drop-down titled "Depth". Set the depth of children terms you would like to include in results.

As an argument, enter any taxonomy term ID you know to have nodes tagged with its children terms, and you will see results including the argument and all children.

I'd forgotten the exact way to do this myself, but it's outlined on this site.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文