带有节点的分类视图

发布于 2024-09-15 06:35:36 字数 378 浏览 13 评论 0原文

使用 Drupal 6,我尝试创建一个包含如下视图的页面:

-分类术语 1
-- 包含该术语的节点的标题和描述
-- 包含该术语的节点的标题和描述
-分类术语 2
-- 包含该术语的节点的标题和描述
-- 包含该术语的节点的标题和描述
-分类术语 3
-- 包含该术语的节点的标题和描述
-- 包含该术语的节点的标题和描述

所以基本上,当我进入此页面时,我会看到特定词汇表的分类术语作为标题列出,在下面我会看到具有该分类术语的所有节点的标题和描述。

这可能与视图有关吗?或者如果没有,是否有另一个模块可以帮助我?或者我应该自己应对这种情况?

Using Drupal 6, I'm trying to create a page with views that shows something like the following:

-Taxonomy Term 1
-- Title and description of a node that contains this term
-- Title and description of a node that contains this term
-Taxonomy Term 2
-- Title and description of a node that contains this term
-- Title and description of a node that contains this term
-Taxonomy Term 3
-- Title and description of a node that contains this term
-- Title and description of a node that contains this term

So basically when I go to this page, I see taxonomy terms of a particular vocabulary listed out as titles, and underneath I see the title and description of all nodes that have this taxonomy term.

Is this possible to do with views? Or if not, Is there another module that can help me? Or should I be rolling my own for this situation?

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

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

发布评论

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

评论(1

墨小沫ゞ 2024-09-22 06:35:36

是的,这绝对是可能的,具体方法如下。

  1. 创建一个新视图并将“Node”作为基表。
  2. 如果您只想列出特定词汇表中的术语,请为您的分类词汇表添加“分类法:词汇表”过滤器。
  3. 添加“分类:术语”字段,并将其从显示中排除。
  4. 添加“节点:标题”字段。
  5. 添加“分类:术语”排序选项。由您决定是否要按升序或降序排序。
  6. 对于视图的样式,选择“无格式”,然后在随后的选项中,选择“分类:术语”字段作为分组字段。
  7. 确保将“限制行数”设置为无限制。
  8. 制作一个页面显示,给它一个 URL。

就是这样。这里的重点是“分组字段”部分;这将根据分配给它们的分类术语对所有节点进行分组。希望有帮助!

Yes, this is definitely possible, and here's how.

  1. Create a new view and make "Node" the base table.
  2. Add a "Taxonomy: Vocabulary" filter for your taxonomy vocabulary, if you would only like to list the terms from a specific vocabulary.
  3. Add a "Taxonomy: Term" field, and have it excluded from display.
  4. Add a "Node: Title" field.
  5. Add a "Taxonomy: Term" sorting option. It's up to you whether you want it to sort ascending or descending.
  6. For the View's style, select "Unformatted", and in the options that come after that, select your "Taxonomy: Term" field as the grouping field.
  7. Make sure you have the "Limit Rows" set to unlimited.
  8. Make a page display, give it a URL.

That's it. The key point here is the "Grouping Field" part; that's what will group all of the nodes by the taxonomy terms assigned to them. Hope that helps!

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