From d3d75c80ce416a1d6eafceaff2be63019c4e544a Mon Sep 17 00:00:00 2001 From: Sebastiaan Janssen Date: Sun, 13 Mar 2016 13:33:14 +0100 Subject: [PATCH] Select the current forum for new topics if we're in an existing forum already --- .../Views/MacroPartials/Forum/TopicForm.cshtml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/OurUmbraco.Site/Views/MacroPartials/Forum/TopicForm.cshtml b/OurUmbraco.Site/Views/MacroPartials/Forum/TopicForm.cshtml index 9d1cd0a7..90c1a118 100644 --- a/OurUmbraco.Site/Views/MacroPartials/Forum/TopicForm.cshtml +++ b/OurUmbraco.Site/Views/MacroPartials/Forum/TopicForm.cshtml @@ -17,12 +17,22 @@ @if (CurrentPage.Parent.DocumentTypeAlias != "Project") { + var categories = Model.Content.AncestorOrSelf(2).Children.Where(m => m.NewTopicsAllowed()).ToList(); + var categoriesIncludeCurrentPage = categories.Any(x => x.Id == Model.Content.Id); +