public ActionResult BlogHistory(AgilityContentItem module)
        {
            #region --- Get Blog Config and Repos ---
            var blogConfigRef             = module["BlogConfiguration"] as string;
            AgilityContentItem blogConfig = null;
            IAgilityContentRepository <AgilityContentItem> blogPosts      = null;
            IAgilityContentRepository <AgilityContentItem> blogCategories = null;
            IAgilityContentRepository <AgilityContentItem> blogTags       = null;
            IAgilityContentRepository <AgilityContentItem> blogAuthors    = null;
            BlogUtils.GetBlogConfig(blogConfigRef, out blogConfig, out blogPosts, out blogCategories, out blogTags, out blogAuthors);
            #endregion

            int numMonthsToDisplay;
            int.TryParse(string.Format("{0}", blogConfig["BlogHistoryMonthsMax"]), out numMonthsToDisplay);

            if (numMonthsToDisplay < 1)
            {
                numMonthsToDisplay = 12;
            }

            var months = new List <DateTime>();
            for (var i = 0; i < numMonthsToDisplay; i++)
            {
                var month = DateTime.Now.AddMonths(-i);
                months.Add(month);
            }

            var model = new BlogLinkViewModel();
            model.ShowCount     = model.ShowCount = BlogUtils.GetBool(blogConfig["ShowPostCounts"]);
            model.Items         = BlogUtils.GetBlogLinksWithPostCounts(blogConfig, blogPosts, months, model.ShowCount);
            model.SkipZeroPosts = true;
            model.Configuration = blogConfig;

            return(PartialView(AgilityComponents.TemplatePath("Blog-HistoryModule"), model));
        }
        public ActionResult BlogTags(AgilityContentItem module)
        {
            #region --- Get Blog Config and Repos ---
            var blogConfigRef             = module["BlogConfiguration"] as string;
            AgilityContentItem blogConfig = null;
            IAgilityContentRepository <AgilityContentItem> blogPosts      = null;
            IAgilityContentRepository <AgilityContentItem> blogCategories = null;
            IAgilityContentRepository <AgilityContentItem> blogTags       = null;
            IAgilityContentRepository <AgilityContentItem> blogAuthors    = null;
            BlogUtils.GetBlogConfig(blogConfigRef, out blogConfig, out blogPosts, out blogCategories, out blogTags, out blogAuthors);
            #endregion

            var model = new BlogLinkViewModel();
            model.ShowCount     = BlogUtils.GetBool(blogConfig["ShowPostCounts"]);
            model.Items         = BlogUtils.GetBlogLinksWithPostCounts(blogConfig, blogPosts, blogTags, model.ShowCount);
            model.Configuration = blogConfig;

            return(PartialView(AgilityComponents.TemplatePath("Blog-TagsModule"), model));
        }