Hello stackoverflow people hope you can help me with maybe a simple question, but couldn't find a solution elsewhere and I have just been working with umbraco for a week now and have never used the mvc part before so all is new for me.
So the big problem is how I make a macro to show these images I choose from the multiple media picker the macro should just end with showing.
<img src="img1.gif" height="50" width="50">
<img src="img2.gif" height="50" width="50">
And so on depending on how many images there is. (the size is just an exempel)
I tryed somthing like this
@var selectedMedia3 = @Library.MediaById(Model.mainImage);
<img src="@selectedMedia3.umbracoFile" width="@selectedMedia3.umbracoWidth" height="@selectedMedia3.umbracoHeight" alt="@selectedMedia3.Name"/>
}
But I dont know how to parse the id of the image to the macro. and when I choose more than one file I need a loop, but dont know how to loop the multiple media picker data, so im a little lost by now.