1

I have a content type called 'style' and another one called 'style - description'. Unfortunately, it's necessary to split the two up. 'style' will be a sort of portal page, while 'style - description' contains further information about said style.

So, 'style - description' has an entity reference field that points to one of the 'style' nodes. I want to display content from a 'style - description' node on the 'style' node that has been referenced.

I've been trying to do this through a view with a relationship and a contextual filter, though I don't seem to be getting anywhere with that. Anyone any ideas?

  • This can be easily done using relationships in Views 3. Can you post more details about the exact settings within your View so that folks can help you troubleshoot the work you've already done? – sheena_d Sep 4 '12 at 13:52
  • Managed to get it too work. Just needed to fiddle with it a bit more. I made a view displaying 'style' as content, used the reference field on 'style - description' as a relationship and then used the node's ID as a contextual filter. I'm still not 100% sure HOW it works, but it works. – Zedicius Sep 4 '12 at 13:59
1

I think you forgot to add a relationship in your views.

If you use References module it works.(i know it'll be deprecated soon but for now it works well and save my life few times:))

  • In your content type add a field node reference to the article
  • In your views add a contextual filter [node:id] (add some validation criteria about your content type)
  • After add relationship References
  • After you can hide the fields (don't forget in the setting formatter: rendered node) enter image description here

After that you'll have the result you want. result

| improve this answer | |
  • It's not that I forgot making a relationship, I simply made the wrong ones :p -But yes, this works! – Zedicius Sep 4 '12 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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