London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Keep PageChanged-data from OriginalPage

Vote:
0

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:
0

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.