带有节点的分类视图 [英] Taxonomy view with nodes

查看:20
本文介绍了带有节点的分类视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 Drupal 6,我尝试创建一个页面,其视图显示如下所示:

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

-分类术语 1
-- 包含该术语的节点的标题和描述
-- 包含该术语的节点的标题和描述
-分类术语 2
-- 包含该术语的节点的标题和描述
-- 包含该术语的节点的标题和描述
-分类第 3 学期
-- 包含该术语的节点的标题和描述
-- 包含这个词的节点的标题和描述

-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?

推荐答案

是的,这绝对是可能的,方法如下.

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

  1. 创建一个新视图并使节点"成为基表.
  2. 如果您只想列出特定词汇表中的术语,请为您的分类词汇添加分类:词汇"过滤器.
  3. 添加分类:术语"字段,并将其从显示中排除.
  4. 添加节点:标题"字段.
  5. 添加分类:术语"排序选项.是否要按升序或降序对其进行排序取决于您.
  6. 对于视图的样式,选择Unformatted",然后在之后的选项中,选择Taxonomy: Term"字段作为分组字段.
  7. 确保将限制行"设置为无限制.
  8. 显示一个页面,给它一个 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!

这篇关于带有节点的分类视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆