Blogging module index page blog name

pull/441/head
Yunus Emre Kalkan 7 years ago
parent 5d6fcd81c1
commit 4c7e397e36

@ -29,9 +29,9 @@
<div class="row">
<div class="col">
<h1 class="my-0 display-inline-block">
@L["Volosoft"]
@Model.Blog.Name
<small class="text-muted">
BLOG
@L["BLOG"]
</small>
</h1>
</div>

@ -3,6 +3,7 @@ using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Volo.Blogging.Blogs;
using Volo.Blogging.Blogs.Dtos;
using Volo.Blogging.Posts;
using Volo.Blogging.Tagging;
using Volo.Blogging.Tagging.Dtos;
@ -21,6 +22,8 @@ namespace Volo.Blogging.Pages.Blog.Posts
[BindProperty(SupportsGet = true)]
public string TagName { get; set; }
public BlogDto Blog { get; set; }
public IReadOnlyList<PostWithDetailsDto> Posts { get; set; }
public IReadOnlyList<TagDto> PopularTags { get; set; }
@ -34,8 +37,8 @@ namespace Volo.Blogging.Pages.Blog.Posts
public async Task OnGetAsync()
{
var blog = await _blogAppService.GetByShortNameAsync(BlogShortName);
Posts = (await _postAppService.GetListByBlogIdAndTagName(blog.Id, TagName)).Items;
Blog = await _blogAppService.GetByShortNameAsync(BlogShortName);
Posts = (await _postAppService.GetListByBlogIdAndTagName(Blog.Id, TagName)).Items;
PopularTags = (await _tagAppService.GetPopularTags(new GetPopularTagsInput {ResultCount = 10}));
}
}

Loading…
Cancel
Save