Closed (duplicate)
Project:
Term Fields
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Jun 2011 at 20:33 UTC
Updated:
29 Aug 2012 at 18:13 UTC
I have an image field for my terms and a view of those terms. I can display the image's file name in a view, but how can I show the actual image?
Thanks
Comments
Comment #1
b-prod commentedYou can use for example the "rewrite field" option:
<img src="[base_url if necessary]/[path to the file folder]/[view token for the image URL]" alt="[view token for the node title e.g.]" />It is also possible for example to use an imagecache path for auto resizing etc.
Comment #2
anrikun commentedReally?
I don't see any "Image" type in Term fields.
And when using File as type, all I can display is file FIDs, not file names.
Comment #3
b-prod commentedSome work has to be done on the file/image widget on the new 2.x DEV version.
Comment #4
b-prod commentedDUplicate of #900910: Optimize the image widget
Comment #5
freeform.steph commentedIf you have views custom field installed (http://drupal.org/project/views_customfield) you can use php to display your image. Add the term field as normal, but set it to not display. Then add a new php field with the following:
If you also add a hidden field for the title than you can populate the alt and title attributes.
Or, if you have imagecache installed, you can use a preset like so: