Thanks for replying anyway Dennis. I figured out this is all I needed to do to select a folder and access its children. Its very similar except how I'm getting the media picker.
var photoFolder = Model.Content.GetPropertyValue("photos").ToString();
foreach (var m in Umbraco.TypedMedia(photoFolder).Children)
{
}
TypeMedia MediaPicker no children
I have this gallery that worked in a previously and since upgrading I'm not seeing any children returned when I use the TypeMedia(media picker id).
It's been a few years since I looked at this so I'm wondering if I something became obsolete?
When I loop through mediaObj.Children its null but I can see that I'm passing in the media picker id into TypeMedia.
Hi Dan
Have a look here https://our.umbraco.org/documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Media-Picker2
There are also some code examples
Hope this helps
/Dennis
Thanks Dennis,
That solution does work but I'm not looking to select one item or a group. I'm trying to select the entire folder which isn't explained there.
I had this working once before but apparently its not returning anything.
Thanks for replying anyway Dennis. I figured out this is all I needed to do to select a folder and access its children. Its very similar except how I'm getting the media picker.
is working on a reply...