Try our conversational search powered by Generative AI!

ContentReferenceCollection-property that prevents deleting referenced content?



As we all know ContentReference-property will issue a warning if you are about to delete content that's referenced by the property. I want to have the same functionality on a custom property that contains list of ContentReferences,  but I haven't found documentation on how to implement it. The main point is to prevent users from accidentally deleting referenced pages.

Do you have any advices on how to achieve this functionality

Feb 21, 2013 15:42


It is the class ContentSoftLinkIndexer that is responsible for parsing out references from PropertyData instances and store them as SoftLinks (then at e.g. deletion a check is performed if anythings links to an item that is to be deleted and if so a warning is raised).

What you can do is to inherit from the class and override GetLinks method and register your inherited class in the IOC container. In your implementation of GetLinks you would call base.GetLinks to get the system handled properties and then you can add logic for your custom property.


I have reported a bug that it would be good if the class e.g. exposed an event to make it possible to handle custom properties without having to create a subclass.

Feb 22, 2013 11:50

Thank you! I will try that one out :)

Mar 13, 2013 14:54
May 13, 2014 18:01

Btw. is this fixed in Episerver 7.5?

May 13, 2014 18:02


No it is not fixed in 7.5, it is still in the backlog...

May 14, 2014 20:17
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.