Can nodereference refer to a LIST of nodes? Or is there another module I should be looking at?

I already have nodereferrence working great, where each child has a nodereference to a single parent, and, using Views Attached, I can display a parent with all the children that refer to it. Each parent has a unique list of children (and vice versa).

But I'd like to expand this so that each pupil has a node reference to all the teachers that teach it, and I can then show each teacher, and all the pupils that refer to them. Teachers share pupils, and vice versa.

Current use

  • Parent node 1
    • Child node A (node reference to parent 1)
    • Child node B (node reference to parent 1)
       
  • Parent node 2
    • Child node C (node reference to parent 2)
    • Child node D (node reference to parent 2)

Required use

  • Teacher node 1
    • Pupil node A (node reference to Teacher 1)
    • Pupil node B (node reference to Teacher 1)
    • Pupil node D (node reference to Teacher 1)
  • Parent node 2
    • Pupil node C (node reference to Teacher 2)
    • Pupil node D (How to also refer to Teacher 2?)

Comments

iantresman’s picture

Someone suggested that "You can have a nodereference field with multiple values". Does anyone know how?

I'd like to have nodes that refer to multiple parent nodes, and then attach views to the parents showing all their children.

Encarte’s picture

Priority: Normal » Minor
Status: Active » Fixed

Just go to the node type settings (admin/content/types) and change that noderefence field «Number of values:» to whatever you want...

iantresman’s picture

Many thanks for that, it took me a while to figure out that if the "Reference from URL" widget is selected then the "Number of Values" option in the Global Settings section, does not appear.

I also didn't realize that you don't need the "Reference from URL" widget, and the other two widgets are also useful!

It's a shame that you can't use the "Reference from URL" widget to add a node reference to an existing set of node references.

Encarte’s picture

The «Reference from URL» widget is actually the Node Reference URL Widget. You may want to search the issues there...

iantresman’s picture

Of course it is! Thanks for the reminder.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.