London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
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?