Desktop Settings

Desktop Settings

Controls featured in this example:

  • Sitecore Web Control

Classes featured in this example:

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

C# Web Control Code

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

output.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
output.Write("C# Web Control Real-time Output");
output.RenderEndTag();

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 space
output.Write("{0}: {1}", "Item", item.Name);
output.RenderEndTag(); //P

output.Write("{0}&#58;&#160;{1}", "Default Desktop", "<b>" + Sitecore.Configuration.Settings.DefaultDesktop + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Wallpaper", "<b>" + Sitecore.Configuration.Settings.Wallpaper + "</b><br/>");
output.Write("{0}&#58;&#160;{1}", "Wallpapers Path", "<b>" + Sitecore.Configuration.Settings.WallpapersPath + "</b>");
output.RenderEndTag(); //Div

Item: DesktopSettings

Default Desktop: /sitecore/client/desktops/standard/default.aspx
Wallpaper: 
Wallpapers Path: /sitecore/shell/Themes/Background