public ClientNavigationManageModel() { _clientNavigationService = HostContainer.GetInstance <IClientNavigationService>(); IncludeInSiteNavigation = true; DisableNavigationCascade = false; Parents = _clientNavigationService.GetPossibleParents(); int position; int relativePageId; var relativePages = _clientNavigationService.GetRelativeNavigations(out position, out relativePageId); Positions = EnumUtilities.GenerateSelectListItems <PageEnums.PagePosition>(); UrlTargets = EnumUtilities.GenerateSelectListItems <CommonEnums.UrlTarget>(GenerateEnumType.DescriptionValueAndDescriptionText); Position = position; RelativeNavigationId = relativePageId; RelativeNavigations = relativePages; }
public ClientNavigationManageModel(ClientNavigation navigation) : this() { Id = navigation.Id; Title = navigation.Title; Url = navigation.Url; UrlTarget = navigation.UrlTarget; IncludeInSiteNavigation = navigation.IncludeInSiteNavigation; DisableNavigationCascade = navigation.DisableNavigationCascade; StartPublishingDate = navigation.StartPublishingDate; EndPublishingDate = navigation.EndPublishingDate; ParentId = navigation.ParentId; Parents = _clientNavigationService.GetPossibleParents(navigation.Id); int position; int relativePageId; var relativePages = _clientNavigationService.GetRelativeNavigations(out position, out relativePageId, navigation.Id, navigation.ParentId); Position = position; RelativeNavigationId = relativePageId; RelativeNavigations = relativePages; }
public JsonResult GetParents(int?id) { return(Json(_clientNavigationService.GetPossibleParents(id), JsonRequestBehavior.AllowGet)); }