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

Keep PageChanged-data from OriginalPage

Vote:
 

Hi

 

I want to copy a page in EPiServer, and I want the page I am copying to get the same exact "PageChanged" value that the original page has. 

Is this possible?

I'm thinking in the lines of 

clone.Property["PageChanged"].Value = originalPage.Changed;
clone.Property["PageChangedOnPublish"].Value = false;
But the copied page still gets the Changed date set to now. 
 
I can add that keeping the PageCreated-date from the originalpage is working: 
clone.Property["PageCreated"].Value = originalPage.Created;
 
Any clues how to solve this?
 

 /Andreas

#57509
Mar 16, 2012 13:09
Vote:
 

Was doing something similiar but I didn't find an elegant solution... I stored the original datetime in my own property and printed that with PageChanged as fallback. Then I cleared my property in the saving event on the next save where where PageChangedOnPublish was true.

#57693
Mar 24, 2012 0:20
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.