Currently you can easily go from A to B via the Node Reference but since the link is from C to B you cannot get the link to C -- this is the current problem.
In short, you can solve the problem by using the module Node Referrer (see http://drupal.org/node/431308 for what it does). Essentially it creates a read only field that tells you all the nodes pointing from C to B (i.e. a sort of reverse node reference is created for each node reference).
So lets say we have the following Node Reference fields
- In content type A we have the node
reference field called
a_to_b_link
- In content type C we have the node reference field called
c_to_b_link
- In content type B we have the Node Referrer field that tracks all
the links in the Node Reference
c_to_b_link
Creating the corresponding view is a little bit more involved.
- First add a filter for
Node: Type =
A
- Add a relationship
a_to_b_link
. Make sure the you tick the checkbox
Require this relationship
- Add another relationship from the Node group called
Node:
Referrers
. Also make sure in the settings for the relationship you should
choose the a_to_b_link
in the Relationship
drop down. In other words you are making a relationship that uses a pre-existing relationship (similar in concept to a pointer to a pointer in C++) Make sure the you tick the checkbox Require this relationship
. This relationship by default is named Referencing Nodes
by Drupal.
- Now add whatever fields you want from content type A as you would do
normally in the view.
- When you want to add fields from content type C make sure you select
the relationship
Referencing Nodes