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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
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...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.