I was wondering if anyone has a decent trick to show 4 images in a row from multiple entries containing channel images. So the four newest channel-images no matter which entry they come from.
The problem is that I don't know how may images an entry will contain, since you can put any number of images in an entry.
codewise:
{exp:channel:entries limit="4"} {channel_images_field} <img src="{image:url:large}" /> {/channel_images_field} {/exp:channel:entries}
Will output any number of images, depending on the amount of images in the channel_images_field. It could be 3+2+5+7.
I could of course erase the rest using brute force js frontend or with css overflow:hidden, but I'd rather just parse 4 from the server.
EDIT
The complete tag is inside a category tag and contains another EE field, making it difficult to use the channel_images tag outside the channel entries tag.
{exp:channel:categories channel="gallery"}
{exp:channel:entries channel="gallery" dynamic="no" category="{category_id}" limit="4"}
{channel_images_field}
<img src="{image:url:large}" />
{comment_field_poster}
{/channel_images_field}
{/exp:channel:entries}
{/exp:channel:categories}
I suppose that makes it impossible to really solve it due to nesting issues. It's either all images from a channel, agnostic to the related entries, or the images inside a specified entry tag, agnostic to the channel_images total.
See it live here: http://www.fotografielessen.nl/index.php/Fotoalbum/ (now showing the first four entries with all the images, sorted by category)