Multiple node reference, display the original node as many as node reference

I have 2 custom type made with CCK :

  • Reunion
    • Title
    • Description
    • Node reference to Guests (multiple)
  • Guests
    • Name
    • Picture
    • Biography

In Reunion I have a multiple node reference to Guests. (I can have multiple Guest in Reunion).

I would like to print (using views) like this :

Reunion 1
 Description of the reunion 1
 Guests :
  * Guest 1
  * Guest 2
  * Guest 3

Reunion 2
 Description of the reunion 2
 Guests :
  * Guest 2
  * Guest 3

But the only way to print through views seems to be

Reunion 1
 Description of the reunion 1
 Guests :
  * Guest 1
Reunion 1
 Description of the reunion 1
 Guests :
  * Guest 2
Reunion 1
 Description of the reunion 1
 Guests :
  * Guest 3

Reunion 2
 Description of the reunion 2
 Guests :
  * Guest 2
Reunion 2
 Description of the reunion 2
 Guests :
  * Guest 3

I have of course tried the Distinct option in the view parameter, but unfortunately, it only show me

Reunion 1
     Description of the reunion 1
     Guests :
      * Guest 1

Reunion 2
     Description of the reunion 2
     Guests :
      * Guest 2

And apparently skip the other Guests after the first one. Is there any simple solution ?

Thanks !

Answers


Try node:distinct and "group multiple values"

Edit: Ok, this made me curious, so I tried to recreate your scenario:

node type 1: Reunion Fields: Title(default Drupal), Description(textfield multiple rows), Guest (nodereference to Guest, multiple values)

node type 2: Guest Title (used as name - otherwise you'll have to use relationships to show other fields), other fields.

Then create View of type node In the defaults, choose Style - Unformatted, Row Style - Fields. Add fields Title, Content: description, Content: Guest (as link to node). Make sure that Group multiple values option is checked for Guest field (it's enabled by default but I actually had to recheck it to make it active). In the Filters choose Node: Published and filter by Node Type = Reunion. Run preview to see if it's working (it should).

Now create Page View and give it path "reunions". If you go to path "reunions" it should be working as required grouping multiple fields together.


Need Your Help

MSSQL installed features

sql sql-server reporting-services ssis

I am looking for a command simliar to the @@VERSION variable that will tell me features installed in my MSSQL instance (e.g. SSIS/SSRS etc..). Is there a simple way to pull this information through...

b2Body Animation?

ios animation cocos2d-iphone box2d

I am using Box2D with Cocos2D in my game. I am aware that Cocos2D has a animation API named CCMoveTo. I want to do the same thing in Box2D with b2Bodies. I want to be able to set a destination poin...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.