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...
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
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...
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.