Skip to content

Commit b255340

Browse files
authored
Merge pull request #296 from fullreboot/category_fix
Fix category hardcoded label
2 parents 376e3d8 + 92bb171 commit b255340

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Blogifier/Controllers/HomeController.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ public async Task<IActionResult> Categories(string category, int page = 1)
9090
var model = await getBlogPosts("", page, category);
9191
string viewPath = $"~/Views/Themes/{model.Blog.Theme}/Category.cshtml";
9292

93+
ViewBag.Category = category;
94+
9395
if (IsViewExists(viewPath))
9496
return View(viewPath, model);
9597

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1+
@using Blogifier.Shared.Resources
2+
@using Blogifier.Shared
3+
@using Microsoft.Extensions.Localization
4+
@inject IStringLocalizer<Resource> _localizer
15
@{
26
Layout = "layouts/_main.cshtml";
37
}
48

59
<main class="container">
6-
<h1 class="h3 mb-5">CATEGORY_TITLE</h1>
10+
<h1 class="h3 mb-5">@_localizer["categories"]: <strong>@ViewBag.Category</strong></h1>
711
<partial name="post/view-list.cshtml" />
812
</main>

0 commit comments

Comments
 (0)