Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
HI All,
I want configure a view where i can able to fetch the image and title field from the content type by creating some relation between two content type .
For example i have one content type called Abc in this content type i need to pass some relation to the different content type called Xyz and i want to fetch the field from the XYZ content type as per the node selected.
So please help me on this because i am new in Views and i need your supports.
Thanks
Ankur Kumar Mishra
Comments
Comment #1
crutch CreditAttribution: crutch commentedNot exactly sure what you are trying to do but this may give you some idea http://drupal.stackexchange.com/questions/32510/how-to-use-entity-refere...
You must provide a relationship in some way, then when adding fields you can require the relationship to display the referenced entity data item.
So say XYZ contains a data "Beans". Then when creating a view for ABC (assuming you also have an entity reference field in ABC content type that references XYZ) then you add the entity reference relationship under "Relationships" in Views.
Then, you can add a XYZ data field to your ABC view in the "Fields", and choose "Require Relationship", and this will display the content from XYZ "Beans" in your ABC View.
Comment #2
ankurkumar.mishra CreditAttribution: ankurkumar.mishra commentedthanks Crutch... its helps me
Comment #3
MustangGB CreditAttribution: MustangGB commentedComment #4
renatogComment #5
renatogHi guys.
Thank you Jay. I tested and really using Entity reference is a good way for to get those references.
It's very useful.
@ankurkumar.mishra; any question you can comment here, okay?!
Thank you very much.