Publishing start and end dates are set brute force

When setting publishing start and end dates on a publishing page, these dates will be saved in the PublishStartDate and PublishEndDate fields of the publishing page. Changing the scheduling settings will result in an immediate change of the page (with the modified by and modified date properties set as well), regardless of the state of…

1

Anatomy of page lifecycles in SharePoint 2010 publishing pages

  As most of you already know, SharePoint 2010 brings a whole load of nice publishing features out of the box. One of these are the handling of publishing pages. Publishing pages are basically .aspx pages that get their content from the listitem associated to them. You can imagine a publishing page much like any…

1

Setting Modified by, Editor and other fields when versioning and content approval is enabled

Most of you are probably aware that setting fields like Modified, Editor, Created and Author require some special attention: 1: using (SPSite site = new SPSite("http://sp2010")) 2: using (SPWeb web = site.OpenWeb()) 3: { 4: SPFile f = web.GetFile("/Pages/default.aspx"); 5:  6: f.Item["Modified"] = DateTime.Now.AddDays(-2); 7: f.Item["Editor"] = "-1;#SHAREPOINT\\SYSTEM"; 8: f.Item.UpdateOverwriteVersion(); 9: } So far so…