Skip to main content

I've created a view that lists a number of nodes. I've added the relationship of "comments on node" and then added the comments as a field in the view. The problem I'm having is that if there are multiple comments on the node, the view lists the node multiple times. For instance currently the view displays likes this

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 2

I would like it to be displayed like this;

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1
Comment: Comment 2

iI know it has something to do with grouping, adand that other similar posts have simply recommended grouping by the title field, but this does not aciaveachieve the desired results. Am I missing something?

I've created a view that lists a number of nodes. I've added the relationship of "comments on node" and then added the comments as a field in the view. The problem I'm having is that if there are multiple comments on the node, the view lists the node multiple times. For instance currently the view displays likes this

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 2

I would like it to be displayed like this;

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1
Comment: Comment 2

i know it has something to do with grouping, ad that other similar posts have simply recommended grouping by the title field, but this does not aciave the desired results. Am I missing something?

I've created a view that lists a number of nodes. I've added the relationship of "comments on node" and then added the comments as a field in the view. The problem I'm having is that if there are multiple comments on the node, the view lists the node multiple times. For instance currently the view displays likes this

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 2

I would like it to be displayed like this;

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1
Comment: Comment 2

I know it has something to do with grouping, and that other similar posts have simply recommended grouping by the title field, but this does not achieve the desired results. Am I missing something?

Source Link
user379468
  • 2.5k
  • 3
  • 31
  • 49

Displaying grouped view of node comments in a view listing nodes

I've created a view that lists a number of nodes. I've added the relationship of "comments on node" and then added the comments as a field in the view. The problem I'm having is that if there are multiple comments on the node, the view lists the node multiple times. For instance currently the view displays likes this

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 2

I would like it to be displayed like this;

Node Title: Title 1
Nid: 1
Node Image: Image
Comment: Comment 1
Comment: Comment 2

i know it has something to do with grouping, ad that other similar posts have simply recommended grouping by the title field, but this does not aciave the desired results. Am I missing something?