public ActionResult ContactPageUpdate() { var key = Controller.Content.ContentTypeKey.ContactPageContent; ContentData itemToEdit = controller.GetContentDataByKey(key); UpdateHtmlContentViewModel model = new UpdateHtmlContentViewModel() { Content = HttpUtility.HtmlDecode(itemToEdit != null ? itemToEdit.Value : "<p><br></p>") }; return(View(model)); }
public ActionResult UpdateJumbotronContent() { var titleKey = Controller.Content.ContentTypeKey.StartPageTitle; ContentData titleToEdit = controller.GetContentDataByKey(titleKey); var subtitleKey = Controller.Content.ContentTypeKey.StartPageSubtitle; ContentData subtitleToEdit = controller.GetContentDataByKey(subtitleKey); var paragraphKey = Controller.Content.ContentTypeKey.StartPageParagraph; ContentData pargraphToEdit = controller.GetContentDataByKey(paragraphKey); var buttonKey = Controller.Content.ContentTypeKey.StartPageButton; ContentData buttonToEdit = controller.GetContentDataByKey(buttonKey); UpdateStartPageContentViewModel model = new UpdateStartPageContentViewModel() { Title = HttpUtility.HtmlDecode(titleToEdit != null ? titleToEdit.Value : "<p><br></p>"), Subtitle = HttpUtility.HtmlDecode(subtitleToEdit != null ? subtitleToEdit.Value : "<p><br></p>"), Paragraph = HttpUtility.HtmlDecode(pargraphToEdit != null ? pargraphToEdit.Value : "<p><br></p>"), Button = HttpUtility.HtmlDecode(buttonToEdit != null ? buttonToEdit.Value : "<p><br></p>") }; return(View(model)); }