/// <summary> /// Get file template manage model for edit/create /// </summary> /// <param name="id"></param> /// <returns></returns> public FileTemplateManageModel GetTemplateManageModel(int?id = null) { var template = GetById(id); if (template != null) { return(new FileTemplateManageModel { Id = template.Id, Name = template.Name, Action = template.Action, Controller = template.Controller, Parameters = template.Parameters, PageTemplateId = template.PageTemplateId, PageTemplates = _pageTemplateServices.GetPageTemplateSelectListForFileTemplate(template.Id), ParentId = template.ParentId, Parents = GetPossibleParents(template.Id) }); } return(new FileTemplateManageModel { PageTemplates = _pageTemplateServices.GetPageTemplateSelectListForFileTemplate(), Parents = GetPossibleParents() }); }
public JsonResult GetPageTemplates(int?id) { return(Json(_pageTemplateServices.GetPageTemplateSelectListForFileTemplate(id), JsonRequestBehavior.AllowGet)); }