I've created a CCK content type "News Item" with an ImageField "image_gallery" allowing unlimited images. I've set up a Views page to display various fields including "image_gallery". For this page, I've limited the image_gallery field to show only ONE image (using the "Group multiple values" checkbox, showing 1 value to 1, starting at 0). I also pull in the "(field_image_gallery) - data" field to display the description for the first image... except there's no option on the data field to limit it to ONLY SHOW THE FIRST IMAGE'S DATA!

So when I look at the page that Views generates, I have a bunch of identical rows of the same news item, each with the first picture of the gallery just like I want, with the only difference between each of these news items being the caption their image.

A new identical row is generated for each additional gallery image's caption. No duplicate news items are generated if I leave out the "(field_image_gallery) - data" field in the View...

Am I missing something here? For the "News Items" page, I want to list the news item and include a thumbnail of the FIRST picture in the gallery, along with its description. I'd like to do this without re-theming the views row output if possible.

Comments

thadwheeler’s picture

jessehs,.
have you come up with a solution to this? I am working on exactly the same thing?

thadwheeler’s picture

jessehs,
I found a working solution to limiting the imagefield -data displayed in a view -I was able add a filter on imagefield delta - set the value equal to 0 ( first image ) , this seems to limit the image and the data - without having to set a limit and starting point on the imagefield selection.

quicksketch’s picture

Status: Active » Closed (fixed)

Closing after lack of activity.

amariotti’s picture

Status: Closed (fixed) » Active

I followed your instructions above and it doesn't really do what you mentioned. If I put in 0 it doesn't change the view, if I add a 1 it displays all products with 2+ images into the view and eliminates the ones with just one. It's understandable why it does that, but from my standpoint I'd like to just display a single image in my view and not the additional ones attached to my products. I'm assuming that this should actually just be a setting on the imagefield, field settings in views. Simply part of the format section that says, post all images or first one only. Any ideas how this could be done?

amariotti’s picture

StatusFileSize
new25.1 KB

Figured out where it is. See attached screenshot. It was on the settings of that field under "Group Multiple Values." Set it to limit to 1, and start from 0! Sometimes talking gets me thinking and then solves problems. :)

quicksketch’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

blackspiraldancer’s picture

Status: Closed (fixed) » Closed (works as designed)

Maybe you've already solved this, but I think the most neat way to pick just the first image is to add a filter, choose the "delta" image field type you're working with and put a filter "equal to 0". This way just the first element of the image field will be selected by the view. I also tried grouping but doesn't really do what you mean.