Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I am using the most recent versions of Drupal (7.14), Views (3.3) and the Entity reference module (1.0 rc3).

I have three content types. The first of them (parent) contains a node reference field to the second (child), which has a node reference to the third (grandchild). Each of these reference fields have unlimited values.

I have set up a block view, with relationships for both node reference fields, and have defined a contextual filter for the parent node id.

This is what I want to display in the parent node, each with summaries and a few other fields from the referenced nodes:

Child 1
Grandchild 1
Grandchild 2
Grandchild 3

Child 2
Grandchild 4
Grandchild 5

With displaying an unformatted list of fields, I get the following result (aggregation doesn't help at all):

Child 1
Grandchild 1

Child 1
Grandchild 2

Child 1
Grandchild 3

Child 2
Grandchild 4

Child 2
Grandchild 5

Any suggestions for how I can get the display that I want?

share|improve this question
add comment

1 Answer

So you've tried going into your 'Settings' for the unformatted list style and setting a 'Grouping field' already?

If not, try the following, and make sure to check the box I've checked here as well:

enter image description here

share|improve this answer
1  
Thanks a million! I had tried to work with that before, but now I fiddled with it a little more, and got it to work. :) Here's what I did in addition to your tip: 1. Excluded all child node type's fields from display 2. Grouped like you instructed by each field of the child node type –  user1482257 Jun 26 '12 at 17:59
    
Glad it worked! –  Boriana Jun 28 '12 at 18:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.