按视图中的有机组列出 Drupal 节点
使用视图和 og,我正在制作所有节点的表格列表。我想按节点的有机组进行排序。
我可以将组名称包含为一列。我试图限制它只允许一个帖子属于一个组(我可能也做得不对)。
我还可以按组进行过滤 - 但这不是我想要的。
如果我尝试按组名称排序,组名称不会列为可用列。
编辑: 我发现了一个废弃的线程,基本上说它目前不可能: http://drupal.org/node/180988< /a>
Using views and og, I am doing a table listing of all nodes. I want to sort by the node's organic group.
I can include the group name as a column. I've tried to restrict it to only allow a post to belong to one group (which I may not be doing right either).
I can also filter by the group - but that's not what I want.
If I try to sort by the group name, the group name is not listed as an available column.
Edit:
I found an abandoned thread that basically says it isn't currently possible: http://drupal.org/node/180988
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您无法按组名称排序的问题是该字段在视图中不可排序。这可能可以追溯到一个节点可能属于多个组的事实。如果是的话那么视图将如何对其进行排序?我知道您说过您将帖子限制为仅属于一个组,但情况并非总是如此。您可以做的一件事是在样式:表格设置下。如果您将其中的分组字段设置为 OG,那么您将获得多个表,其中仅包含发布到该组的节点。
I think the problem with you not being able to sort by the group name is the fact that the field is not sortable in views. This probably goes back to the fact that a node may be part of multiple groups. If it is then how would views sort it then? I know you said you are restricting a post to only be a part of one group, but that is not always the case all the time. The one thing that you can do is under the Style: Table settings. If you set the grouping field in there to the OG then you will get multiple tables with just the nodes posted to that group.