I haven’t tried it yet, but I think you can indeed run the mgGetImages snippet as a snippet renderer in Collections to get the first image and to output that
But that was not really what i needed to know, or maybe i interpreted your initial question wrong.
I would like to show the first image of MoreGallery in the List view of Collections:
You can see this printscreen: https://cl.ly/nHFK
So i have a parent with children that are all Gallery page types with images in it.
I changed the parent to a Collection to show the children as a nicer list, but i cant seem to figure out how to ‘pull’ of show the first image out of the MoreGallery.
Haha, read the whole topic again, and see what you mean
In the end i didn’t try to get it in to Collections, because of a lack time i had.
I think Mark’s suggestion is valid, but as said as above: no time no fun…
Maybe late, but I solved this if anybody still interested.
There is several unobvious bumps: to call mgGetImages you need resource id, but can’t make renderer for ‘id’ column. Id column is mandatory and used for Collections core functionality. So I used ‘Snippet Renderer’ for some unused column (e.g."class_key’):
Please note you can’t use @INLINE template inside snippet call, so I used chunk ‘collectionsGalleryImageRenderer_tpl’ that returns manager thumb url:
[[+mgr_thumb]]
Unfortunately in this setup img tag would be written into Collections grid as plaintext, not html element. So I set column Renderer to ‘rawHtmlMX’ that do the magic: