0

I'm using References module. I have parent node where I can choose multiple child nodes for it. This parent has reference-field. I have made views to list child nodes when viewing parent node.

Now I need to have views to show parent node when viewing child node.

This should be fairly easy to do(?), but I was not able to achieve it. I tried with reverse reference relationship, but it does not show nothing on child page.

How to show parent node (in views) when viewing child node?

1 Answer 1

1

Create one content type view with views module,

Set relationship >> Content: Reference node (field_reference_node)

In contextual filter >> Content: Nid (relationship field_reference_node)

Pass NID of child node within argument will result all node referenced with parent content.

9
  • Are you suggesting to use Entity reference module? I dont have field Entity fields in my Views: (choose Entity Reference: Referenced Entity)
    – hene
    Commented Mar 16, 2016 at 6:29
  • no with reference module itself can be possible check edited answer
    – vgoradiya
    Commented Mar 16, 2016 at 6:31
  • Okey. What settings should I use in Contextual filter? I have added field Content: Nid. What to choose for: "When the filter value is NOT available"? Tried with "Display all results for the specified field" and "Provide default value: Content ID from URL". But it is showing all childs, not parents.
    – hene
    Commented Mar 16, 2016 at 6:36
  • what you added in relationship?
    – vgoradiya
    Commented Mar 16, 2016 at 6:41
  • I have added Reference field which is in Parent node: "Content: Reference".
    – hene
    Commented Mar 16, 2016 at 6:44

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.