public ActionResult Index(string slug) { ViewBag.CurrentLanguage = CurrentLanguage; if (!string.IsNullOrEmpty(slug)) { NccPage page = _pageService.GetBySlug(slug); if (page != null) { page = _mediator.Send(new OnPageShow(page)).Result; foreach (var item in page.PageDetails) { item.Content = _nccShortCodeProvider.ReplaceShortContent(item.Content); } return(View(page)); } } TempData["Message"] = "Page not found"; return(Redirect(NccUrlHelper.AddLanguageToUrl(CurrentLanguage, "/CmsHome/ResourceNotFound"))); }