Hello,
I'm stuck at something thats supposed to be simple but I just can't get it right.
What this peace of code to do, is to check if gallery loop is empty and it is then show the img and if it is not empty then show the gallery loop.
I have tried amny versions of the following but nothing seems to work:
@foreach (var i in GetLoop("ItemPublisher:Item.AddSimpleGalleryImgs")) {
if (GetValue("ItemPublisher:Item.AddSimpleGalleryImgs") != "null") {
<a href='@i.GetValue("ItemPublisher:Item.AddSimpleGalleryImgs.AddSimpleGalleryImg")' data-fancybox="images">
<img src='@i.GetValue("ItemPublisher:Item.AddSimpleGalleryImgs.AddSimpleGalleryImg")' class="img-fluid" width="24.7%" style="margin-bottom:3px" />
</a>
} else if (GetValue("ItemPublisher:Item.AddSimpleGalleryImgs") == "nul") {
<img src='@GetValue("ItemPublisher:Item.SimpleGalleriListImg")' class="img-fluid" />
}