Skip to content

Commit 6c91c5e

Browse files
author
Ajay kumar
committed
[Blog] [Ajay]: Add tags on home page
1 parent 426f284 commit 6c91c5e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

TestArena/Blog/BlogHome.razor

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
@using TestArena.Blog.Common.NavigationUtils
44

55
<h2 class="mb-4">Latest Blogs</h2>
6+
7+
<h4 class="mb-4">
8+
@foreach(var tag in SiteMap.Pages.SelectMany(x => x.Tags).Distinct())
9+
{
10+
var route = $"/filtered-blogs?tag={tag}";
11+
<a href="@route" class="text-info px-2">#@tag</a>
12+
}
13+
</h4>
614
<div class="row row-cols-1 row-cols-md-3 g-4 p-2">
715

816
@{

0 commit comments

Comments
 (0)