public PartialViewResult ExitPage() { var currentPage = _umbracoHelper.CurrentPage; var cultureName = GetCultureNameForPublishedContent(currentPage); var exitModel = _cacheProvider.CachedGet <ExitPageViewModel>(string.Format("{0}_{1}", "ExitPage", cultureName), () => { var exitViewModel = new ExitPageViewModel(); var homePageNode = _umbracoHelper.AncenstorOrSelf(currentPage, 1); var exitNode = _umbracoHelper.GetDescendantNodesOfType(homePageNode.Id, _nodeConfig.ExitNodeAlias).FirstOrDefault(); _umbracoMapper.Map(exitNode, exitViewModel); var dictionaryTerms = new ExitPageDictionaryViewModel(); _umbracoMapper.MapUsingDictionary(dictionaryTerms); exitViewModel.SetDictionary(dictionaryTerms); return(exitViewModel); }); return(PartialView("ExitPage", exitModel)); }
internal void SetDictionary(ExitPageDictionaryViewModel dictionary) { Dictionary = dictionary; }