public ActionResult Index(string id = "") { var m = ListModel.Get(); try { if (!String.IsNullOrEmpty(id)) { ViewBag.Expanded = new Guid(id); } else { ViewBag.Expanded = Guid.Empty; } } catch { ViewBag.Expanded = Guid.Empty; } // Executes the media list loaded hook, if registered if (WebPages.Hooks.Manager.MediaListModelLoaded != null) { WebPages.Hooks.Manager.MediaListModelLoaded(this, WebPages.Manager.GetActiveMenuItem(), m); } return(View("Index", ListModel.Get())); }
public override void InitManager(object model) { var internalId = Config.SiteTree; var listModel = ListModel.Get(internalId); Pages = new SelectList(listModel.Pages, "Id", "Title", PageId); base.InitManager(model); }
public ActionResult Index() { try { var param = Models.SysParam.GetByName("SITEMAP_EXPANDED_LEVELS"); ViewBag.Levels = param != null?Convert.ToInt32(param.Value) : 0; } catch { ViewBag.Levels = 0; } return(View("Index", ListModel.Get())); }
public ActionResult Index() { var m = ListModel.Get(); // Executes the category list loaded hook, if registered if (Hooks.Manager.Category.Model.OnListLoad != null) { Hooks.Manager.Category.Model.OnListLoad(this, WebPages.Manager.GetActiveMenuItem(), m); } return(View("Index", m)); }
public ActionResult Index(string id = "") { try { if (!String.IsNullOrEmpty(id)) { ViewBag.Expanded = new Guid(id); } else { ViewBag.Expanded = Guid.Empty; } } catch { ViewBag.Expanded = Guid.Empty; } return(View("Index", ListModel.Get())); }
public ActionResult Index(string id = "") { var internalId = Config.SiteTree; try { var param = Piranha.Models.SysParam.GetByName("SITEMAP_EXPANDED_LEVELS"); ViewBag.Levels = param != null?Convert.ToInt32(param.Value) : 0; if (!String.IsNullOrEmpty(id)) { var p = Page.GetSingle(new Guid(id), true); if (p != null) { internalId = p.SiteTreeInternalId; } ViewBag.Expanded = new Guid(id); } else { ViewBag.Expanded = Guid.Empty; } } catch { ViewBag.Levels = 0; ViewBag.Expanded = Guid.Empty; } var m = ListModel.Get(internalId); ViewBag.Title = @Piranha.Resources.Page.ListTitle; // Executes the page list loaded hook, if registered if (Hooks.Manager.Page.Model.OnListLoad != null) { Hooks.Manager.Page.Model.OnListLoad(this, WebPages.Manager.GetActiveMenuItem(), m); } return(View(@"~/Areas/Manager/Views/Page/Index.cshtml", m)); }
public ActionResult Site(string id) { try { var param = Piranha.Models.SysParam.GetByName("SITEMAP_EXPANDED_LEVELS"); ViewBag.Levels = param != null?Convert.ToInt32(param.Value) : 0; ViewBag.Expanded = Guid.Empty; } catch { ViewBag.Levels = 0; ViewBag.Expanded = Guid.Empty; } var m = ListModel.Get(id); ViewBag.Title = @Piranha.Resources.Page.ListTitle; // Executes the page list loaded hook, if registered if (Hooks.Manager.Page.Model.OnListLoad != null) { Hooks.Manager.Page.Model.OnListLoad(this, WebPages.Manager.GetActiveMenuItem(), m); } return(View(@"~/Areas/Manager/Views/Page/Index.cshtml", m)); }
public override void InitManager(object model) { var internalId = Piranha.Config.SiteTree; var listModel = ListModel.Get(internalId); Pages = new SelectList(listModel.Pages, "Id", "Title"); EntityTypeService entityTypeSrv = new EntityTypeService(db); FieldsMapping = new SelectList((entityTypeSrv.GetEntityTypeAttributeMappings()), "Id", "Name"); if (Fields.Count > 0) { foreach (var field in Fields) { CFEntityTypeAttributeMapping map = entityTypeService.GetEntityTypeAttributeMappingById(field.Id); Mappings.Add(map); } } EntityTypes = new SelectList(entityTypeService.GetEntityTypes(), "Name", "Name"); base.InitManager(model); }
public ActionResult List() { return(View(ListModel.Get())); }
public ActionResult Index() { return(View("Index", ListModel.Get())); }
public ActionResult List(string slug = null) { return(View(ListModel.Get(slug))); }