internal static PageAdminSectionDefinition ReadPageAdminSectionXml(XmlElement cfxml) { PageAdminSectionDefinition def = new PageAdminSectionDefinition(); def.SectionName = cfxml.GetAttribute("Name"); XmlElement e = cfxml.SelectSingleNode("Label") as XmlElement; def.Label = e == null ? null : e.InnerText == "" ? null : e.InnerText; e = cfxml.SelectSingleNode("Hint") as XmlElement; def.Hint = e == null ? null : e.InnerText == "" ? null : e.InnerText; if (cfxml.HasAttribute("InSection")) { string inSection = cfxml.GetAttribute("InSection"); if (inSection != null && inSection != String.Empty) { def.InSection = inSection; } } XmlNodeList efnodes = cfxml.SelectNodes("EditFields/*"); foreach (XmlElement xml in efnodes) { IEditFieldObjectCreator creator = ContentManager.GetEditFieldObjectCreator(xml.Name); if (creator != null) { IEditFieldHandler handler = creator.CreateHandler(); handler.Initialise(xml); def.EditFieldHandlers.Add(handler); } } return(def); }
internal static PageAdminSectionDefinition ReadPageAdminSectionXml(XmlElement cfxml) { PageAdminSectionDefinition def = new PageAdminSectionDefinition(); def.SectionName = cfxml.GetAttribute("Name"); XmlElement e = cfxml.SelectSingleNode("Label") as XmlElement; def.Label = e == null ? null : e.InnerText == "" ? null : e.InnerText; e = cfxml.SelectSingleNode("Hint") as XmlElement; def.Hint = e == null ? null : e.InnerText == "" ? null : e.InnerText; if (cfxml.HasAttribute("InSection")) { string inSection = cfxml.GetAttribute("InSection"); if (inSection != null && inSection != String.Empty) def.InSection = inSection; } XmlNodeList efnodes = cfxml.SelectNodes("EditFields/*"); foreach (XmlElement xml in efnodes) { IEditFieldObjectCreator creator = ContentManager.GetEditFieldObjectCreator(xml.Name); if (creator != null) { IEditFieldHandler handler = creator.CreateHandler(); handler.Initialise(xml); def.EditFieldHandlers.Add(handler); } } return def; }