public async Task <IActionResult> Blog() { if (!await _parametersManager.GetValue <bool>(ParameterTypes.PageBlogEnabled)) { return(RedirectToAction("Index", "Content")); } ViewData["TotalPages"] = Math.Ceiling(await _postsManager.Count(_signInManager.IsSignedIn(User)) / (decimal)Constants.ItemsPerPagePosts); return(View(await _postsManager.GetRange(0, Constants.ItemsPerPagePosts, _signInManager.IsSignedIn(User)))); }