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!
AI OnAI Off
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!
You don't specify which EPiServer version, but in both EPiServer 6 and 7 the procedure would go something like this:
var clone = CurrentPage.CreateWriteableClone();
clone["PageStopPublish"] = null;
DataFactory.Instance.Save(clone, SaveAction.Publish , AccessLevel.NoAccess);
What code are you trying?
Hi,
We're still in version 5 but your code works. Thank you! I had only tried setting clone.StopPublish = null and that has failed for me.
Thanks again! Have a nice weekend!
Glad to help. Please use the "Mark reply as answer" feature so others can see the thread is solved.
I'm trying to clear the value of StopPublish of a page in code. How do I do this? I thought it would be a pretty simple thing to accomplish but it looks to be a lot harder.