tags:

views:

1068

answers:

4

I have a question about views, specifically about grouping a relationship. I have a "partner" node that has many "docs", I want to list the name of the "partner" along with its corresponding "docs" below. I have the relationship set up correctly(I think) but can't figure out how or where to group it correctly.

I get this:

partner name 1
- doc name 1
partner name 1
- doc name 2
partner name 1
- doc name 3
partner name 2
- doc name 4
partner name 2
- doc name 5
partner name 3
- doc name 6

but would like this:

partner name 1
- doc name 1
- doc name 2
- doc name 3

partner name 2
- doc name 4
- doc name 5
- doc name 6
+3  A: 

It sounds like you're on the right track. In order to get the grouping to work as you outline above, you'll need to set the display style to 'html list', and then under the style options, set the grouping field to the partner name. Once you have this working, you can edit the partner name field, and select 'exclude from display', which should then give you the desired format.

jhedstrom
That's the exact config I have set, but the output still is as listed above.
Ronn
+2  A: 

I ran into this same problem today. In an attempt to troubleshoot, I made a new empty installation of Drupal and added only my content type and the relationship. When I created the view I did not see the problem. Once I started adding modules back in I found that the theme developer in the development module is causing the problem. Try unchecking it and reloading your view. You might also be able to see this by leaving the item checked, opening up a different browser and going to the view as someone that will not see the theme developer.

We Love Drupal
+2  A: 

Thanks jhedstrom, I had the exact problem and your answer solved it. Disabling the Theme Developer Module worked.

Rick Hocutt
A: 

Would others agree that this is convoluted? It points me in the right direction for the desired result, but is extremely unintuitive and difficult to control. For instance, I'd like to group by Partner name and Partner Image (image cache), then display Doc name and Doc Image nested underneath. Given this method, how can this be achieved? Can you group by two fields? Is there official documentation regarding this situation? I'm at a loss for direction and puzzled by the complexity of a simple nested display.

ahabman

related questions