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

Get pages referenced to a block

Vote:
 

Hi,

We need to do some extra process when deleting a block, we need a list which using the block, but don't know how to get this list. 

Please anyone know how to get this list can give me an advice?

Thank you very much

Hai

#72604
Jun 24, 2013 13:29
Vote:
 
#72605
Jun 24, 2013 13:35
Vote:
 

Thanks,

Below code gave me the expected result:

var repository = ServiceLocator.Current.GetInstance<IContentRepository>();
                var refPages = (List<ReferenceInformation>) repository.GetReferencesToContent(pageLink, false);

    

#72629
Jun 25, 2013 4:38
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.