Closed (duplicate)
Project:
ImageField
Version:
5.x-1.1
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
29 Jun 2007 at 12:18 UTC
Updated:
15 Sep 2007 at 02:00 UTC
In my views-list-contenttype.tpl.php i call the (multiy) images uploaded with cck/imagefield with
print $field_image_fid[0]
Is there a way to show only the first image uploaded by the user?
Something like:
print $field_image_fid[0]
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| views_0.png | 45.21 KB | dotidentity |
Comments
Comment #1
quicksketchTry:
Comment #2
bfdexp commentedAttempted in the tpl.php with no avail. Any other suggestions. Having same issue?
Comment #3
bfdexp commentedMaybe this should be a feature request? In the UI, maybe an option to display the first X amount of images as the teaser?
Comment #4
bfdexp commentedMade some minor progress. Found a lot of help here: Drupal Imagecache, Views, CCK, and Imagefields. On this page I found the way to display the image you by it's FID, however it is not as easy as printing the image[0] image[1], ect since the FID is a unique number assigned on a incrementing basis, not on a node basis. So we will have to use some logic to display the first one, two, or three images and it can't be by FID. Unless you do display the first FIDs per node.
A quick fix to the whole problem if you just want to display the first image is to set the following filter: Node: Distinct. This will restrict each node to one distinct field.
Hopefully someone will have a real answer soon....
Comment #5
sunMarking as duplicate of http://drupal.org/node/156528