Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
Hi,
Maybue you could iterate through all block types and use IContentModelUsage service to check where the block is used:
var contentUsage = ServiceLocator.Current.GetInstance<IContentModelUsage>(); var usage = contentUsage.ListContentOfContentType(imageFileContentType);
This will allow you to check block type usage.
And if you need to check where specific block instance is used, the you could use ContentSoftLinkRepository
var SoftLinkRepository = ServiceLocator.Current.GetInstance<ContentSoftLinkRepository>()
How do I use ContentSoftLinkRepository in EPiServer 9? I get an error saying "StructureMap.StructureMapConfigurationException: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Web.IPermanentLinkMapper'"
Hi everyone,
Is there anyway which I can query all specific block which is not used anywhere?
Regards,
Aria