Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi there,
I am able to get a Media object and want to itterate through all the children, but only the images.
How would I do this?
This is what I have now:
Media media = new Media(folderId); Media[] children = media.Children.Where...?
Hi SaphuA,
How about:
using umbraco; using System.Linq; Media media = new Media(123); foreach(Media imageMedia in media.GetChildMedia().Where(x => x.ContentType.Alias == "Image")) { // do something }
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Media children, but only images!
Hi there,
I am able to get a Media object and want to itterate through all the children, but only the images.
How would I do this?
This is what I have now:
Media media = new Media(folderId);
Media[] children = media.Children.Where...?
Hi SaphuA,
How about:
is working on a reply...