IsDeleted

Vote:
 

Hello,

 

I need to do something when a page IsDeleted but how can I retreive its orignal location to retreive his parent.

 

Regards,

 

Benjamin

#80383
Jan 22, 2014 9:32
Vote:
 

There is a repository that keeps track of deleted items, to be able to restore them. You should be able to use that repsoitory to get the previous parent. Like:

ServiceLocator.Current.GetInstance<EPiServer.DataAccess.IParentRestoreRepository>().GetParentLink(contentLink)

It should return the previous parent (or ContentReference.EmptyReference if the item is not found in the repository)

#80392
Jan 22, 2014 11:58
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.