2

I have two content types, courses and tutors. Tutors contains a biography and a large photo

Courses contains lots of other information but more importantly contains a tutor field which is a entity reference field type. It creates a dropdown list containing all tutors.

The problem I have is that when I create a new course page and select a tutor from the dropdown list, it displays the full biography and large photo.

What I want it to display is the first say 100 characters of the biography and a cropped version of the tutor photo (I have set up a image style which crops the photo to 100px)

I’m guessing there may be 2 ways of doing this. 1) Customising a teaser 2) Creating a view but I’m not sure how you reference it and how you would get the view to just show the selected tutor (from the dropdown list above)

I am using Drupal 7

Any advice much appreciated.

1 Answer 1

2

Sounds like you know what your doing. Like you say either create a 'view mode' in your content type or create a view. All you have to do with the view is create a relationship (under 'relationships' in the advanced section) to get your entity reference and set a filter for the tutor.

Tried to find something similar to your issue, hope it helps. How to use Entity Reference and Views

1
  • 1
    Hi Alex, thanks for your reply. I'm still struggling with this. I added two entity references 1 - A bridge to the Content entity that is referenced via field_tutor and another 2 - A bridge to the Content entity that is referencing Content via field_tutor and applied them to displays. I saved the view. I then went to the course tutor field and clicked on entity reference. I select "views filter by an entity reference view" under mode and it says No eligible views were found. I also tried adding the relationship to the filters as per your link but that didn't work and actually returned nothing Oct 5, 2012 at 14:56

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.