When working with a gallery, you can use this tag <!--@Gallery.Image.Metadata.title--> to retrieve the metadata, added to the image.
But is there a way you can retrieve the same data from an item, that loops through the content of a folder. I would like to use the metadata.title of the image as caption text in a gallery, but can't seem to find a way.
Here's the code:
foreach(var file in GetLoop("Item.Mappe.ListOfFiles")){
var imgPath =folder + "/" + file.GetValue("Item.Mappe.FileName");
<a href="/admin/public/getimage.ashx?Image=@imgPath&Resolution=72&Compression=90&Width=1000&Height=600&Crop=0"
class="strip"
data-strip-group="mygroup" data-strip-caption="[HERE I WOULD LIKE TO USE THE METADATA]"><div class="col-lg-4 col-sm-4 col-md-4 stripjs__padding"><img src="/admin/public/getimage.ashx?Image=@imgPath&Resolution=72&Compression=90&Width=300&Height=350&Crop=0" class="img-responsive"></div></a>
}
BR
Martin