public static IEnumerable<SectionControl> GetControls(WebPage page, PageTemplate template, string section) { var cons = page.Controls.Where(o => o.Section == section).Select(o => o.ToSectionControl()) .Union(template.Controls.Where(o => o.Section == section).Select(o => o.ToSectionControl())) .OrderBy(o => o.Order); return cons; }
public ServerResponse EditTemplate(PageTemplate template) { return template.Save(o => pageProvider.UpdateTemplate(o)); }
public bool UpdateTemplate(PageTemplate template) { return repoTemplate.Update(template); }
public ServerResponse AddTemplate(PageTemplate template) { return template.Save(o => pageProvider.AddTemplate(o)); }
public bool AddTemplate(PageTemplate template) { return repoTemplate.Insert(template); }