Publishing Settings

Publishing Settings

Controls featured in this example:

  • Sitecore Web Control

Classes featured in this example:

  • Sitecore.Configuration.Settings
  • Sitecore.Configuration.Settings.Publishing
  • Sitecore.Context
  • Sitecore.Data.Items.Item

Publishing Settings C# Web Control Code

Sitecore.Data.Items.Item item = Sitecore.Context.Item;
if (item == null) return;

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.Write("C# Web Control Real-time Output");
output.RenderEndTag();

output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-size:x-small; width:100%; clear:both");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Style, "font-weight:bold");
output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.P);
//using : for colon and ? for question mark and   for space
output.Write("{0}: {1}", "Item", item.DisplayName);
output.RenderEndTag(); //P

string defaultPublishingTargets = Sitecore.Configuration.Settings.DefaultPublishingTargets;
string fastPublishing = Sitecore.Configuration.Settings.FastPublishing.ToString();
string autoScheduleSmartPublish = Sitecore.Configuration.Settings.Publishing.AutoScheduleSmartPublish.ToString();
string checkSecurity = Sitecore.Configuration.Settings.Publishing.CheckSecurity.ToString();
string compareRevisions = Sitecore.Configuration.Settings.Publishing.CompareRevisions.ToString();
string logInterval = Sitecore.Configuration.Settings.Publishing.LogInterval.ToString();
string publishDialogPollingInterval = Sitecore.Configuration.Settings.Publishing.PublishDialogPollingInterval.ToString();
string publishEmptyItems = Sitecore.Configuration.Settings.Publishing.PublishEmptyItems.ToString();
string requireTarget = Sitecore.Configuration.Settings.Publishing.RequireTargetDeleteRightWhenCheckingSecurity.ToString();
string threadPriority = Sitecore.Configuration.Settings.Publishing.ThreadPriority.ToString();

//using : for colon and   for space
output.Write("{0}&#58;&#160;{1}", "Default Publishing Targets", "<b>" + defaultPublishingTargets + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Fast Publishing", "<b>" + fastPublishing + "</b><br/>");
output.Write("{0}&#63;&#160;{1}", "Auto Schedule Smart Publish", "<b>" + autoScheduleSmartPublish + "</b></br>");
output.Write("{0}&#63;&#160;{1}", "Check Security", "<b>" + checkSecurity + "</b></br>");
output.Write("{0}&#63;&#160;{1}", "Compare Revisions", "<b>" + compareRevisions + "</b></br>");
output.Write("{0}&#58;&#160;{1}", "Log Interval", "<b>" + logInterval + "</b></br>");
output.Write("{0}&#58;&#160;{1}", "Publish Dialog Polling Interval", "<b>" + publishDialogPollingInterval + "</b></br>");
output.Write("{0}&#63;&#160;{1}", "Publish Empty Items", "<b>" + publishEmptyItems + "</b></br>");
output.Write("{0}&#63;&#160;{1}", "Require Target Delete Right When Checking Security", "<b>" + requireTarget + "</b></br>");
output.Write("{0}&#58;&#160;{1}", "Thread Priority", "<b>" + threadPriority + "</b>");

output.RenderEndTag(); //Div


Publishing Settings C# Web Control Output

Default Publishing Targets: ||
Fast Publishing? False
Auto Schedule Smart Publish? True
Check Security? False
Compare Revisions? True
Log Interval: 0
Publish Dialog Polling Interval: 500
Publish Empty Items? True
Require Target Delete Right When Checking Security? True
Thread Priority: BelowNormal