Not really up to speed with v11 just yet but to get the children of a media folder can you try using using the Children property of the media item object that represents the folder. Maybe something like:
var folderId = Model.GetParameterValue<int>("mediaFolder");
var folder = Umbraco.Media(folderId);
if (folder != null)
{
var children = folder.Children();
foreach (var child in children)
{
var imageUrl = child.Url;
/ / Do something with the imageUrl here
}
}
Umbraco.Media(id) does not work in Umbraco 11
Hello,
i try to get the children of a media folder from Multimediapicker Paramenter in a Macro Partial View
this is correct, id is 1117, folder has 5 children
this return always null
Can anyone help?
Hello!
Not really up to speed with v11 just yet but to get the children of a media folder can you try using using the
Children
property of the media item object that represents the folder. Maybe something like:*codes untested
Thanks
is working on a reply...