greetings all, long time drupal user, first time forum poster. in general i find my answers with the right search terms, but i've been fumbling around this issue for a little while, and thought i'd increase my own and other folks' chance of discovering a solution, by (re)indexing the matter with the following description/assessment. i apologize if the solution has already been discussed; and if so please link it (since clearly my search skills can't find it on my own).

so i got imagefield cck and imagecache installed and working (pure genius i tell u! drupal is brilliantly extendable!!), created a custom content type (for my purposes it's a 'Game'), and added an imagefield cck type to it; called 'screenapple'. screenapple is set as not required, but can contain multiple values, and beatifuly renders 50% thumbnails in list views, and 100% in full post bodies.

simply put, i think i want to theme the imagefield such that list views only show the first screenapple (imagefield), while the full node view continues to show all of them (screenapples/imagefields).

i'm hip to creating a field-field_screenapple.tpl.php, and perhaps tracking down the imagefield list and full view defaults as a starting point, and i imagine i'm hunting some php code to limit the trimmed preview/list view to (the first) 1, instead of a for-each typa loop..

you may have gathered i can't write php code from scratch, but i can tweak it a little, so i'm unsure if this is the best approach; i can after all theorize several others, but this feels right...[although, the ability to specify in an imagecache preset, single/multiple/unconstrained/paged listings of an imagefield instance would be fun..]

a big huge thank you to drupalers everywhere for all your generous contributions to all that constitutes drupaldom,
and extra appreciation of ur time reading this,

--dLux

Comments

rodneireis’s picture

Hi dLux, I'm with the same problem, I want to show only the first image of imagefield cck in the teaser. You already found a solution?

Thank you

Rodnei

dlux’s picture

i created a fieldgroup with 2 imagefield cck's:

1) a titlescreen image, there can be only one of these, it's used in the summary view and is the first image in the full article view,
2) a screenshot image, which there can be multiple of, all of which are displayed on the full article view..

surely there is a way to do this in the php, but perhaps this approach has some advantage? anyway it does what i need it to..

sorry it took a while for the reply, and i hope this helps,

--dLux