public ActionResult RenderTemplate(string param1, string param2, string param3) { string url = String.Empty + (string.IsNullOrWhiteSpace(param1) ? "" : "/" + param1) + (string.IsNullOrWhiteSpace(param2) ? "" : "/" + param2) + (string.IsNullOrWhiteSpace(param3) ? "" : "/" + param3); var pages = this.context.Pages.Where(p => p.Url == url).ToList(); if (pages.Count < 1) { return(this.View("Error")); } var page = pages.First(); var postContent = new PostContentViewModel(); postContent.Image = new ImageViewModel() { Url = page.PostContent.Image.Url }; postContent.TemplateTop = page.PostContent.TemplateTop; postContent.TemplateBottom = page.PostContent.TemplateBottom; return(this.View("ImageAndTable", postContent)); }
public void StartWatchingPostCommentsInvoke(object sender, PostContentViewModel args) => StartWatchingPostComments(sender, args);