Can't quite remember how to render an image as part of two foreach loops - i've done it before so not sure where i am going wrong. :(
UPDATE:
I knew this would happen, as soon as i posted for help, BANG - It came in to my head on how to do it. I have to check there is a value if so render the image using Umbraco.TypedMedia & get property value.
Rendering Image inside foreach loop (Razor)
Hello,
I'm trying to render a image inside my foreach loop but having some trouble.
My node structure is like this;
Section Node
Divider Node
Here is my code below;
Can't quite remember how to render an image as part of two foreach loops - i've done it before so not sure where i am going wrong. :(
UPDATE:
I knew this would happen, as soon as i posted for help, BANG - It came in to my head on how to do it. I have to check there is a value if so render the image using Umbraco.TypedMedia & get property value.
Updated code below;
Thanks Javed
Hi Javed,
Did you try yo get URL of media item like :
Thanks
Hi Alex,
I've amended the code above showing the working example.
Thank you for replying though.
Regards Javed
is working on a reply...