protected void Page_Load(object sender, EventArgs e) { templateID = int.Parse(Request["id"]); Template t = new Template(templateID); if (Skinning.StarterKitGuid(templateID).HasValue) { p_apply.Visible = true; string currentSkin = Skinning.GetCurrentSkinAlias(templateID); int templateRoot = FindTemplateRoot((CMSNode)t); dd_skins.Items.Add("Choose..."); foreach (KeyValuePair <string, string> kvp in Skinning.AllowedSkins(templateRoot)) { ListItem li = new ListItem(kvp.Value, kvp.Key); if (kvp.Key == currentSkin) { li.Selected = true; } dd_skins.Items.Add(li); } if (!string.IsNullOrEmpty(Skinning.GetCurrentSkinAlias(templateID))) { ph_rollback.Visible = true; } } }
protected void Page_Load(object sender, EventArgs e) { _templateId = int.Parse(Request["id"]); var t = new Template(_templateId); if (Skinning.StarterKitGuid(_templateId).HasValue) { p_apply.Visible = true; var currentSkin = Skinning.GetCurrentSkinAlias(_templateId); var templateRoot = FindTemplateRoot(t); dd_skins.Items.Add("Choose..."); foreach (var kvp in Skinning.AllowedSkins(templateRoot)) { var li = new ListItem(kvp.Value, kvp.Key); if (kvp.Key == currentSkin) { li.Selected = true; } dd_skins.Items.Add(li); } if (!string.IsNullOrEmpty(Skinning.GetCurrentSkinAlias(_templateId))) { ph_rollback.Visible = true; } } }