I have a Client content type with an Image field named Logo.

Client
- Image: Logo

I also have a User profile with an Entity Reference field name Featured Clients.

User
- Entity Reference

How do I create a View that will show the Client Image Logo of the Client Node referenced in the User profile?

Scenario:

User (example)
- Entity reference for this 'example' user references Client node #1.

I want the image logo of that Client node #1 to show up in the User 'example' profile.

Hope that makes sense. I've been researching Contextual Filters and Entity References in Drupal 7, but I haven't found the right solution yet.

Comments

nevets’s picture

I use the following approach using the display suite module.

Using Display Suite I would add a new view/build mode calling it something like "Logo only".

Then on the manage display tab for users, for the entity reference I would chance the formatter to "rendered entity" and use the "Logo only" view mode.

jollygoodfellow’s picture

When creating a View,

Under Relationships, I selected the following: Profile referencing Content from field_some_featured_clients Require this Relationship is Checked

Under Contextual Filters, I selected the following: - User ID - Specify Validation Criteria >> User >> Allow both User IDs and string usernames - When filter NOT available >> Provide Default Value >> User ID from URL

Under Fields, I selected the following: Content: Logo