5

I've a complicated hierarchy of nodes. Node A contains(by node reference) multiple B nodes, each B contains multiple C nodes and so on.

Using Views will it be possible to reach C from A or vice versa given even higher depth level?

I think this is independent of D6/D7 views but I'm on D6.

There will be thousands of such nodes. Each top level A is an organization and there are a 1000 of them now. Information about each employee or department will be held in File(aka file cabinet) which again is a node).

I want to give users facility to search information from one end to another.

Update: The parent to child relationship is one to many

2 Answers 2

0

You have a bunch of options. I am using noderelationships and thinking of pairing it with reverse_node_reference.

I'd look into these modules.

D6: http://drupal.org/project/noderelationships

D6: http://drupal.org/project/reverse_node_reference (See http://drupal.org/node/798786 for some good insight)

D6, D7: http://drupal.org/project/cnr

D6: http://drupal.org/project/nodereferrer

D6: http://drupal.org/project/backreference

D6: http://drupal.org/project/partners

D7: http://drupal.org/project/references

6
  • Which one do you recommend and why?
    – AgA
    Commented Dec 2, 2011 at 12:07
  • reverse_node_reference is the one I am pursuing because of what is said in this comment, drupal.org/node/798786#comment-2966208 Commented Dec 2, 2011 at 14:21
  • I've parent-child one to many relationship and just now realized both side node reference will not be possible with these modules that is from parent to child and vice versa since parent will then need to have unlimited node reference to children
    – AgA
    Commented Dec 3, 2011 at 10:19
  • 1
    With these modules when given C you should be able to find A. And Given A you should be able to see all B -> C combinations. Having those two cases in a single View is probably not possible with these modules. Commented Dec 7, 2011 at 20:34
  • 1
    You'd most likely have multiple D nodes. You'd have to set up a View "Relationship" for each step using the node reference fields. Meaning you'd need a View "Relationship" for A->B, then one from B->C, and then one for C->D. Commented Dec 8, 2011 at 15:00
1

You can probably do it with the Corresponding Node References module. Otherwise you can't do reverse references at all. You'll use relationships, of course, to go both ways.

4
  • Thanks for this module which is really useful. But what I want to know if we can join view relationships than 2 levels. In SQL it'd be joining 3 or more tables together
    – AgA
    Commented Nov 28, 2011 at 9:05
  • Views can do relationships at more than one level.
    – rfay
    Commented Nov 28, 2011 at 20:38
  • what about 2-5 levels? Do you have an example?
    – AgA
    Commented Nov 29, 2011 at 12:41
  • I've parent-child one to many relationship and just now realized both side node reference will not be possible with these modules that is from parent to child and vice versa since parent will then need to have unlimited node reference to children
    – AgA
    Commented Dec 3, 2011 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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