public ActionResult RenderBlog() { LastBlogPosts model = _homeHelper.GetLatestBlogPostModel(); return(PartialView("~/Views/Partials/Home/_Blog.cshtml", model)); }
public LastBlogPosts GetLatestBlogPostModel() { IPublishedContent homePage = _currentPage.AncestorOrSelf("home"); string title = homePage.GetPropertyValue <string>("lastBlogPostsTitle"); string introduction = homePage.GetPropertyValue("lastBlogPostsIntroduction").ToString(); LastBlogPosts model = new LastBlogPosts(title, introduction); return(model); }