SaaS CMS has officially launched! Learn more now.

Original parent page of deleted page


Content editor can restore previously deleted pages from recycle. 

How EPiServer knows destination to restore page?

Is it possible to get this data during rendering deleted page using direct url?

I need to know previous page location (before moving to recycle).

I hope for your help. All the best, Pavel

Apr 13, 2016 22:02

You should check out this EPiServer interface

public interface IParentRestoreRepository
    void SaveParentLink(ContentReference sourceLink, ContentReference parentLink);

    ContentReference DeleteParentLink(ContentReference sourceLink);

    ContentReference GetParentLink(ContentReference sourceLink);

It's located in EPiServer.DataAccess and handles storing information about original parent during move event to wastebasket. Grab an instance from the ServiceLocator :)

Under the hood it uses the Dynamic Data Store DDS to store the references.

In SEO Manager we keep track of deleted pages to be able to render a custom 410 but then we store the previous url in moved event combined with guid to the content. So that's another possible solution. I'm guessing you want to build some nice 404/410 handling right?

Edited, Apr 13, 2016 23:11

Thanks Daniel,

I'm planning to use this mostly in different scenario. 

P.S. It works only for ContentReference without work id.

All the best,


Apr 14, 2016 15:33
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.