Here's what I did...
1. Create a GBFilePicker field definition in my custom LI2 instance
2. Uploaded a number of images
3. Selected one of the images from the dropdown in the admin LI2 item edit area. This saves the image path.
Then in the template put:
Code: Select all
{assign var='path' value='uploads/images/press/'|cat:$item->item_id|cat:'/*.*'}
{assign var='images' value=$path|glob}
<div class="gallery">
<ul class="clearing-thumbs" data-clearing>
{foreach from=$images item=image}
<li><a href="{$image|escape:'url'|replace:'%2F':'/'}"><img src="{CGSmartImage src=$image|escape:'url'|replace:'%2F':'/' notag=1 width=200}" data-caption="{$item->title}"></a></li>
{/foreach}
</ul>
</div>
You could get clever and create a module_custom template to show all the thumbnails in the admin item edit screen but didn't need it so didn't go there.
Have fun with it.