/// <summary> /// Gets all available content. /// </summary> /// <returns>A list of content records</returns> public static PopupModel Get(string id = "", bool published = false, string filter = "") { PopupModel lm = new PopupModel(); if (!String.IsNullOrEmpty(id)) { lm.SelectedFolder = new Guid(id); lm.Content = Piranha.Models.Content.GetStructure(new Guid(id), true, published); } else lm.Content = Piranha.Models.Content.GetStructure(published); return lm; }
/// <summary> /// Gets all available content. /// </summary> /// <returns>A list of content records</returns> public static PopupModel Get(string id = "") { PopupModel lm = new PopupModel() ; if (!String.IsNullOrEmpty(id)) lm.Content = Piranha.Models.Content.GetStructure(new Guid(id), true) ; else lm.Content = Piranha.Models.Content.GetStructure() ; return lm ; }
/// <summary> /// Gets all available content. /// </summary> /// <returns>A list of content records</returns> public static PopupModel Get(string id = "") { PopupModel lm = new PopupModel(); if (!String.IsNullOrEmpty(id)) { lm.Content = Piranha.Models.Content.GetStructure(new Guid(id), true, false); } else { lm.Content = Piranha.Models.Content.GetStructure(false); } return(lm); }
/// <summary> /// Gets all available content. /// </summary> /// <returns>A list of content records</returns> public static PopupModel Get(string id = "", bool published = false, string filter = "") { PopupModel lm = new PopupModel(); if (!String.IsNullOrEmpty(id)) { lm.SelectedFolder = new Guid(id); lm.Content = Piranha.Models.Content.GetStructure(new Guid(id), true, published); } else { lm.Content = Piranha.Models.Content.GetStructure(published); } return(lm); }
public JsonResult Popup(PopupModel m) { if (ModelState.IsValid) { EditModel em = new EditModel() ; em.Content = m.NewContent ; em.FileUrl = m.FileUrl ; em.UploadedFile = m.UploadedFile ; if (em.SaveAll(false)) return new JsonResult() { Data = true } ; } return new JsonResult() { Data = false } ; }