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
Hello, i am trying to get the children of my multiple media picker. In backend i have picked a folder with 2 images.
I can write "@Model.KarusselMappe" ("KarusselMappe" is my property name of the media picker) and it gives me an id: 1057 which is the id of the folder i have picked. But how can i get the children of this folder.
I have tried with:
var karusselMappeId = Model.KarusselMappe;
foreach (var image in karusselMappeId.children)
But i says: String does not contain a definition for children.
Can someone help?
I think you will need to get the TypedMedia item for the ID of the folder
This will return an iPublishedContent item, which should then provide the children.
The ID value is just an integer, so it wont know anything about Umbraco at that point.
Hope that helps a little.
THANKS, that works. I now have the ID of my images in my picked folder. Thanks a lot!
Glad that helped you out.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted