public PageManageModel(Page page) { _pageServices = HostContainer.GetInstance <IPageServices>(); var pageTemplateServices = HostContainer.GetInstance <IPageTemplateServices>(); var fileTemplateServices = HostContainer.GetInstance <IFileTemplateServices>(); int position; int relativePageId; var relativePages = _pageServices.GetRelativePages(out position, out relativePageId, page.Id, page.ParentId); Id = page.Id; Content = page.Content; Title = page.Title; FriendlyUrl = page.FriendlyUrl; Caption = page.Caption; Status = page.Status; StatusList = _pageServices.GetStatus(); ParentId = page.ParentId; Parents = _pageServices.GetPossibleParents(page.Id); FileTemplateId = page.FileTemplateId; FileTemplates = fileTemplateServices.GetFileTemplateSelectList(page.FileTemplateId); PageTemplateId = page.PageTemplateId; PageTemplates = pageTemplateServices.GetPageTemplateSelectList(page.PageTemplateId); Position = position; Positions = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>(); RelativePageId = relativePageId; RelativePages = relativePages; IncludeInSiteNavigation = page.IncludeInSiteNavigation; Tags = page.PageTags.Select(t => t.TagId).ToList(); TagList = _pageServices.GetPageTags(page.Id); StartPublishingDate = page.StartPublishingDate; EndPublishingDate = page.EndPublishingDate; RecordOrder = page.RecordOrder; RecordActive = page.RecordActive; }
public PageManageModel(Page page) { _pageServices = HostContainer.GetInstance<IPageServices>(); var pageTemplateServices = HostContainer.GetInstance<IPageTemplateServices>(); var fileTemplateServices = HostContainer.GetInstance<IFileTemplateServices>(); int position; int relativePageId; var relativePages = _pageServices.GetRelativePages(out position, out relativePageId, page.Id, page.ParentId); Id = page.Id; Content = page.Content; Title = page.Title; FriendlyUrl = page.FriendlyUrl; Caption = page.Caption; Status = page.Status; StatusList = _pageServices.GetStatus(); ParentId = page.ParentId; Parents = _pageServices.GetPossibleParents(page.Id); FileTemplateId = page.FileTemplateId; FileTemplates = fileTemplateServices.GetFileTemplateSelectList(page.FileTemplateId); PageTemplateId = page.PageTemplateId; PageTemplates = pageTemplateServices.GetPageTemplateSelectList(page.PageTemplateId); Position = position; Positions = EnumUtilities.GetSelectListFromEnum<PageEnums.PositionEnums>(); RelativePageId = relativePageId; RelativePages = relativePages; IncludeInSiteNavigation = page.IncludeInSiteNavigation; Tags = page.PageTags.Select(t => t.TagId).ToList(); TagList = _pageServices.GetPageTags(page.Id); StartPublishingDate = page.StartPublishingDate; EndPublishingDate = page.EndPublishingDate; RecordOrder = page.RecordOrder; RecordActive = page.RecordActive; }
public PageManageModel() { _pageServices = HostContainer.GetInstance<IPageServices>(); var pageTemplateServices = HostContainer.GetInstance<IPageTemplateServices>(); var fileTemplateServices = HostContainer.GetInstance<IFileTemplateServices>(); int position; int relativePageId; var relativePages = _pageServices.GetRelativePages(out position, out relativePageId); StatusList = _pageServices.GetStatus(); Parents = _pageServices.GetPossibleParents(); PageTemplates = pageTemplateServices.GetPageTemplateSelectList(); FileTemplates = fileTemplateServices.GetFileTemplateSelectList(); Positions = EnumUtilities.GetSelectListFromEnum<PageEnums.PositionEnums>(); TagList = _pageServices.GetPageTags(); Position = position; RelativePageId = relativePageId; RelativePages = relativePages; IncludeInSiteNavigation = true; }
public PageManageModel() { _pageServices = HostContainer.GetInstance <IPageServices>(); var pageTemplateServices = HostContainer.GetInstance <IPageTemplateServices>(); var fileTemplateServices = HostContainer.GetInstance <IFileTemplateServices>(); int position; int relativePageId; var relativePages = _pageServices.GetRelativePages(out position, out relativePageId); StatusList = _pageServices.GetStatus(); Parents = _pageServices.GetPossibleParents(); PageTemplates = pageTemplateServices.GetPageTemplateSelectList(); FileTemplates = fileTemplateServices.GetFileTemplateSelectList(); Positions = EnumUtilities.GetSelectListFromEnum <PageEnums.PositionEnums>(); TagList = _pageServices.GetPageTags(); Position = position; RelativePageId = relativePageId; RelativePages = relativePages; IncludeInSiteNavigation = true; }
public JsonResult GetParents(int?id) { return(Json(_pageServices.GetPossibleParents(id), JsonRequestBehavior.AllowGet)); }