Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top