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,
you can easily check if a node is a descendant of another node, but how do you do this for media items? The same function does not seem to be available?
Thanks a lot!
Could you show a snippet of code you're trying?
This works for me:
var testMediaId = 1207; var hasFolderAncestor = Umbraco.TypedMedia(testMediaId).AncestorsOrSelf("Folder").Any();
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
How to check if a media item is a descendant of a particular node in the media section?
Hi,
you can easily check if a node is a descendant of another node, but how do you do this for media items? The same function does not seem to be available?
Thanks a lot!
Could you show a snippet of code you're trying?
This works for me:
is working on a reply...