I want to use the image title (meta data value from below screenshot) to auto display as each images caption underneath each image. Also for Accessibility purposes auto assign this meta value as the 'alt=""' value by default?
Current template code:
<link rel="stylesheet" href="@App.Path/dist/lib/blueimp/css/blueimp-gallery.min.css" data-enableoptimizations="true" />
<script type="text/javascript" src="@App.Path/dist/lib/blueimp/js/blueimp-gallery.min.js" data-enableoptimizations="bottom"></script>
<link rel="stylesheet" href="@App.Path/dist/app/view.css" data-enableoptimizations="true" />
@if(@Dnn.User.IsSuperUser)
{
@Content.Toolbar
} else {
@Edit.Toolbar(Content, actions: "edit,add")
}
<div id="[email protected]" style="display:none;">
@foreach (var pic in AsAdam(Content, "Images").Files)
{
<a href="@[email protected]&[email protected]&mode=crop" title="@(((dynamic)pic.Metadata).Title)" data-gallery="#[email protected]">
@(((dynamic)pic.Metadata).Title)
</a>
}
</div>
@* this is the rotator element *@
<div id='[email protected]' class='blueimp-gallery blueimp-gallery-carousel' data-carousel='true' data-start-slideshow="true">
<div class='slides'></div>
<h3 class='title'></h3>
<a class='prev'>‹</a>
<a class='next'>›</a>
<a class='play-pause'></a>
<ol class='indicator'></ol>
</div>
<script type="text/javascript">
$(document).ready(function () {
// initialize the carousel gallery
blueimp.Gallery($('[data-gallery="#[email protected]"]').get(), {
container: '#[email protected]',
carousel: true
}
);
});
</script>
Also note that when I click on meta data tag, the following error message pop up appears:
Note: Version: 9.2.0
UPDATE: Changing "Image Metadata" to "ImageMetadata" worked thx.
Still having trouble adding alt tag to each image. title shows but when I set alt to same it doesn't?
<div id="[email protected]" style="display:none;">
@foreach (var pic in AsAdam(Content, "Images").Files)
{
<a href="@[email protected]&[email protected]&mode=crop" title="@(((dynamic)pic.Metadata).Title)" alt="@(((dynamic)pic.Metadata).Title)" data-gallery="#[email protected]">
@(((dynamic)pic.Metadata).Title)
</a>
}
</div>


