November Happy Hour will be moved to Thursday December 5th.

Block usage

Vote:
 

Hello,

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

Regards,

BEnjamin

#77327
Nov 15, 2013 15:02
Vote:
 

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

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

#77328
Nov 15, 2013 15:20
Vote:
 

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?

#77329
Nov 15, 2013 15:26
Vote:
 

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

#77331
Nov 15, 2013 15:36
Vote:
 

Ok great thank you

#77332
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.