public ActionResult TextPage(string SeName) { var slug = _urlRecordService.GetBySlug(SeName); if (slug == null) { return(Redirect("/")); } var page = _miniSiteTextPageService.GetById(slug.EntityId); if (page == null) { return(Redirect("/")); } if (page.UserMiniSiteId != _workContext.CurrentMiniSite.Id) { throw new HttpException(404, "Not found"); } var model = new TextPageModel(); model.Header = page.GetLocalized(x => x.Title, _workContext.WorkingLanguage.Id); model.Html = page.GetLocalized(x => x.Html, _workContext.WorkingLanguage.Id); model.Title = page.GetLocalized(x => x.PageTitle, _workContext.WorkingLanguage.Id); return(View(model)); }
// // GET: /FrontPage/ public ActionResult TextPage(RenderModel renderModel) { var model = new TextPageModel() { Header = CurrentPage.GetPropertyValue <string>("header"), BodyText = CurrentPage.GetPropertyValue <IHtmlString>("bodyText") }; return(View(model)); }
// // GET: /TextPage/ // Won't Allow Spaces public ActionResult Subscribe(RenderModel model) { var textPageModel = new TextPageModel(model.Content, model.CurrentCulture); // Properties textPageModel.BodyText = model.Content.GetPropertyValue <string>("bodyText"); // Changed from View to CurrentTemplate return(CurrentTemplate(textPageModel)); }