public ActionResult RenderFiltering(StaffDirectoryFilteringModel model) { if (CurrentPage is StaffDirectoryPage == false) { return(EmptyResult()); } var tagsProvider = new UmbracoStaffProfilePageTagsProvider(ApplicationContext.ApplicationCache.RequestCache); var service = new StaffDirectoryFilteringService(tagsProvider); var viewModel = service.GetFilteringViewModel(model, CurrentPage); return(PartialView("~/Views/Partials/StaffDirectory/Filtering.cshtml", viewModel)); }
public ActionResult RenderListing(StaffDirectoryFilteringModel model) { if (CurrentPage is StaffDirectoryPage == false) { return(EmptyResult()); } var service = new StaffDirectoryService(); var viewModel = new StaffDirectoryListingViewModel { Items = service.GetViewModels(CurrentPage as StaffDirectoryPage, model), Filters = service.ConvertFiltersToNameValueCollection(model) }; return(PartialView("~/Views/Partials/StaffDirectory/Listing.cshtml", viewModel)); }