Skip to content

Commit 92bb171

Browse files
author
FullReboot
committed
Fixes categories hardcoded label on Category.cshtml
1 parent 7a69dd7 commit 92bb171

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
@@ -106,6 +106,8 @@ public async Task<IActionResult> Categories(string category, int page = 1)
106106

107107
string viewPath = $"~/Views/Themes/{model.Blog.Theme}/Category.cshtml";
108108

109+
ViewBag.Category = category;
110+
109111
if (IsViewExists(viewPath))
110112
return View(viewPath, model);
111113

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)