Try our conversational search powered by Generative AI!

Block usage



How can I know, on the "block saved" event on which pages instances this block is used?



Nov 15, 2013 15:02

var contentRepository = //use either DataFactory or ServiceLocator.Current.GetInstance<IContentRepository>();

contentRepository.GetReferencesToContent(contentReference, true).ToList();

Nov 15, 2013 15:20

Does it also work for the Media Items. When I save a item into the media library I need to know where this element is used. Does it also work into the richtext?

Nov 15, 2013 15:26

In EPiServer 7, this method will not return media items since media is not content but in EPiServer 7.5 it will.

Nov 15, 2013 15:36

Ok great thank you

Nov 15, 2013 15:37
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.