Posted in: Comments

If you want to mimic the “Mark page as changed”-checkbox in code it's not so obvious how to do that.

PageData writeablePage = CurrentPage.CreateWritableClone();
writeablePage["PageChangedOnPublish"] = true;

DataFactory.Instance.Save(
    writeablePage,
    SaveAction.Publish,
    AccessLevel.NoAccess);

The CurrentPage.Changed property will now get updated when we publish the page.