SaaS CMS has officially launched! Learn more now.

How can I get all blocks and it's usages?


Please help me with my problem.

I need to get list of all blocks and pages where it's used

Aug 17, 2016 11:13


In IContentRepository you have GetReferencesToContent wich gives you where a specific content item is being used. To find all content of a specific type you can use IContentModelUsage

Aug 17, 2016 21:42

an example of how to implement the interfaces would be quite convenient

Aug 31, 2016 14:14

Why do you want to implement the interfaces? To use them you can either use dependency injection or just get them from the service locator, e.g.:

var modelUsage = ServiceLocator.Current.GetInstance<IContentModelUsage>();
Aug 31, 2016 14:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.