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 using the below code from the documentation page :
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/media-picker
@{ var typedMultiMediaPicker = Model.Content.GetPropertyValue<IEnumerable<IPublishedContent>>("caseStudyImages"); foreach (var item in typedMultiMediaPicker) { <img src="@item.Url" style="width:200px"/> }
}
But I am not able to get the children in typedMultiMediaPicker.
When I do foreach (var item in typedMultiMediaPicker.Children) , I get error.
But @typedMultiMediaPicker.Id does give me the id of my media folder.
can someone please help.
Thanks,
kusum
Hi Kusum
If "typedMultiMediaPicker" is a media folder, then you have to use code like that:
var typedMultiMediaPicker = Model.Content.GetPropertyValue<IPublishedContent>("caseStudyImages"); foreach (var item in typedMultiMediaPicker.Children) { <img src="@item.Url" style="width:200px" /> }
Alex
thanks alex
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
mediapicker issue on 7.6.3
Hello,
I am using the below code from the documentation page :
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/media-picker
}
But I am not able to get the children in typedMultiMediaPicker.
When I do foreach (var item in typedMultiMediaPicker.Children) , I get error.
But @typedMultiMediaPicker.Id does give me the id of my media folder.
can someone please help.
Thanks,
kusum
Hi Kusum
If "typedMultiMediaPicker" is a media folder, then you have to use code like that:
Thanks,
Alex
thanks alex
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.