Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try our conversational search powered by Generative AI!
AI OnAI Off
Virtual Happy Hour is canceled this month (March) due to Good Friday.
Try and use the IContentRepository:
var repository = ServiceLocator.Current.GetInstance<IContentRepository>(); var references = repository.GetReferencesToContent(blockLink, false);
Indeed! ServiceLocator.Current should always be avoided in favor of dependency injection.
(It does makes for more complete and easier to read/understand code examples, which makes it hard to resist in the forum even if I never use it in real code. )
It turns out to be quite easy to find the list of pages referencing a block:
But how do I get the same list but for the blocks referencing the given block? There is no
BlockLinkReference
or similar inReferenceType
enum...