Need Help Displaying Content

Events happening in the community are now at Drupal community events on www.drupal.org.
realEuph's picture

I need some help displaying the correct fields through a view.

I am using Drupal 7 - downloaded the latest versions last week. I am using a custom subtheme of Fusion. I have a custom content type (called custom_image) that contains an image. I created a custom display (called custom_Icon) that displays just the image.

I have another custom content type (called concert) that contains an entity reference to a specific custom_image content node. I have several 'concert' nodes and want to create a summary of them,

To create a summary, I use a view that extracts out the fields from 'concert' that I want including the entity reference to 'custom_image'. I set the display type in the view to be 'custom_icon').

The results show the image (good) and the 'custom_image' title field (bad). I just want the image. I want the image (indirectly) referenced by 'concert' to be displayed with each entry along with some other fields from 'concert'. I do not want the 'custom_image' node title.

I don't have any idea where to start. I think it may be with the template files, but I am not sure which variable to use ($view, $field, or $row in the Field templates) or how to know which element of the data structure to access.

Thanks, any suggestions will be appreciated.

Comments

Relationship

kristen pol's picture

If you add the image content type as a relationship then you can show the desired image fields. I'm on my phone so it's hard for me to point you to a link but just Google views relationships.

Thank You

realEuph's picture

Thanks Kristen. I Googled the terms and found many references to Views 2. I am using Views 3, so a little more work found http://www.graphicline.co.za/content/drupal-views-relationships. It is video on how to set things up. I got all I needed in the first 3:15. [BTW, doesn't anyone write good documentation anymore - it's much faster to find what I want.]

It is important to set up the relationships between the entities (I am using the Entity Reference module) before adding fields. Setting up the relationship adds a drop-down that allows you to choose which relationship applies.

Cool

kristen pol's picture

Glad you found it... the Views 2 documentation should be similar in this case ... I don't remember relationships changing between versions. I agree that I prefer tutorials rather than videos ;)