Beispiel #1
0
        public ActionResult RenderBlog()

        {
            LastBlogPosts model = _homeHelper.GetLatestBlogPostModel();

            return(PartialView("~/Views/Partials/Home/_Blog.cshtml", model));
        }
Beispiel #2
0
        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);
        }