From 364b309fde02280fdc9f89a185097116640f5041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Onur=20P=C4=B1=C3=A7akc=C4=B1?= <98148844+onurpicakci@users.noreply.github.com> Date: Tue, 16 May 2023 09:44:52 +0300 Subject: [PATCH] Blogging: added control for more section --- .../Pages/Blogs/Posts/Detail.cshtml | 140 +++++++++--------- 1 file changed, 73 insertions(+), 67 deletions(-) diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml index 9c44b0feb2..eb4bf912f7 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blogs/Posts/Detail.cshtml @@ -169,46 +169,49 @@ @L["EditProfile"] } -
More from Blog
- @for (var index = 0; index < Model.LatestPosts.Count && index < 5; index++) + @if (Model.LatestPosts.Count > 1) { - if (Model.LatestPosts[index].Id != Model.Post.Id) +More from Blog
+ @for (var index = 0; index < Model.LatestPosts.Count && index < 5; index++) { - var post = Model.LatestPosts[index]; + if (Model.LatestPosts[index].Id != Model.Post.Id) + { + var post = Model.LatestPosts[index]; -