modxcms / Collections

An Extra for MODX Revolution that provides for Resource Collections managed by CollectionContainer Resources
GNU General Public License v2.0
53 stars 37 forks source link

Using MIGX for Image Thumbnail #278

Closed crimsonpixel closed 5 years ago

crimsonpixel commented 5 years ago

To enable the inclusion of multiple images for a product I am using MIGX. How is it possible to add the getImageList snippet to run to display the first image as a thumbnail in the Collection view.

I am guessing I would need to create a snippet to run the that snippet but as my knowledge of PHP is limited, I am not sure where to start...

theboxer commented 5 years ago

You'll need to create a snippet and put it as a snippet renderer on a column. In that snippet you call

$properties = []; // array of properties you want to pass in
$modx->runSnippet('getImageList', $properties);