AI OnAI Off
I found this.
Note that it is marked as "Unsupported INTERNAL API!"
var contentSoftLinkIndexer = ServiceLocator.Current.GetInstance<ContentSoftLinkIndexer>();
var linkedContent = contentSoftLinkIndexer.GetLinks(content);
Hi Peter,
I'd suggest that, rather than use an internal API you could use IContentSoftLinkRepository. That has a "load" method which lets you retrieve a list of content linked from a given piece of content.
There's this method in IContentRepository
_contentRepo.GetReferencesToContent(mediaData.ContentLink, false)
That will let me know if there's content (pages/blocks) that is using the MediaData in someway.
What about the other way around?
Is there a generic way of finding out which MediaData that is referenced by a specific page/block?