如何创建按分类术语对节点进行分组的视图?
我试图让观点和 drupal 屈服于我的意愿。到目前为止,我已经生成了一个视图来显示节点的标题。每个节点都将从集合 {X、Y 和 Z} 中准确分配一个分类术语。
例如,节点 A 的标题是“汽车驶入田野,数千人不在乎”。节点 A 有一个分类术语“无意义”。
我想按分类术语对所有节点标题进行分组。所以..
毫无意义 - 汽车驶入田野,数千人不在乎 - .... 下一个分类术语 - ...... - ...... - ...
你明白了。它可行吗?我该如何做?我在视图中找不到按选项分组。
欢呼吧。
I'm trying to bend views and drupal to my will. So far I've produced a view to display the titles of my nodes. Each node will be assigned exactly one taxonomy term from the set {X, Y and Z}.
So for example, Node A has a title "Car drives into field, thousands don't care". Node A has a taxonomy term "Pointless".
I'd like to group all the node titles by their taxonomy term. So..
Pointless
- Car drives into field, thousands don't care
- ....
Next Taxonomy Term
- .....
- ......
- ...
You get the idea. Is it doable and how do I do it? I can't find the group by option in views.
cheers SO.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
使用表格行样式时可以使用分组。这样做,您可以按视图中包含的任何字段进行分组。
您还可以尝试 taxonews 这可能适合您的情况。
You can use grouping when you use the table row style. Doing that you can group by any field you include in your view.
You could also try out taxonews which could work for your case.
@googletorp 的答案很好。您还可以通过包含术语字段并对其进行排序来进行伪分组。
@googletorp's answer is a good one. You might also pseudo-group by including the term field and sorting on it.
您可以使用视图分组行限制模块,http://drupal.org/project/views_limit_grouping。
此外,如果您想限制组的数量,您可以为该模块应用补丁,http://drupal .org/node/1315888。
You can use Views Grouping Row Limit module, http://drupal.org/project/views_limit_grouping.
In addition, if you want to limit the number of groups, you can apply a patch for that module, http://drupal.org/node/1315888.