Hello,
I'm trying to find a way to display a image instead of a label on a entity reference. This image should also contain the link towards the referenced content.
Is that possible with entity reference? It seems to be a common feature but I can't find how to make it.
Beside I tried to do the same by using a view, but as I need to use a block display I cannot use the contextual filter, so no way to select only the entities pointing to my current node.
Note: so more functionnaly, i have 2 types of nodes: businesses and reviews. A review is talking about 1 business, and 1 business can have only 1 review. On pages business I want to display a link to the related reviewed, using a image. I saw thousand of screencasts but couldn't find a way yet :s
Comments
Comment #1
amitaibu> I'm trying to find a way to display a image instead of a label on a entity reference
You can already have the formatter show the "Rendered entity" in the "Manage display" -- so you can show the image (and other stuff).
Comment #2
trictis CreditAttribution: trictis commentedThank you for your message Amitaibu.
Sorry but in "Manage Display", when i select "rendered entity", I see "full content", "teaser", RSS, "Search index" and "search result".. and I need to display only one image with a link on it. I could use teaser and set the image only, but it wouldn't be a link..
Comment #3
alexmc CreditAttribution: alexmc commentedHmmm, this is a very similar question to the one I just asked... feel free to delete my question.
I don't see any way of controlling the "rendered entity" so I can decide what parts of it to display, or how...
Comment #4
alexmc CreditAttribution: alexmc commentedtrictis, I think I have done what you asked for using the module http://drupal.org/project/entityreference_view_widget
Well, I am not sure about the block handling, but I think I have gotten this working for views.... Give me a shout if you want to discuss it further. I am trying to solve similar problems.
Comment #5
Chaulky CreditAttribution: Chaulky commentedYou can pretty easily create new view modes for better control over the display of the "rendered entity". It does require some coding (or use of modules like Display Suite), but isn't difficult. Checkout of the DrupalCon Denver 2012 video about view modes at http://denver2012.drupal.org/program/sessions/view-modes-many-faces-your.... That might help you solve your particular needs.
Comment #6
yannou CreditAttribution: yannou commentedWhen
the result is : the title of the term is displayed with the created view, despite the title is not in the view. Is it possible to remove it ?
Usage : using the logo of term instead the term.
Comment #6.0
yannou CreditAttribution: yannou commentedtried new tricks that didn't work neither
Comment #7
MustangGB CreditAttribution: MustangGB commented