diff --git a/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs b/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs index 150dc057a..6ddebbc31 100644 --- a/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs +++ b/Dnn.CommunityForums/CustomControls/UserControls/ForumView.cs @@ -170,8 +170,10 @@ public string BuildForumView() { HttpContext.Current.Items.Add("ShowToolbar", false); } + stringBuilder.Replace("[NOTOOLBAR]", string.Empty); } + sTemplate = stringBuilder.ToString(); if (sTemplate.Contains("[FORUMS]")) @@ -219,7 +221,14 @@ public string BuildForumView() } } - this.Forums = this.Forums.OrderBy(f => f.ForumGroup?.SortOrder).ThenBy(f => f.SortOrder).ToList(); + if (this.Request.QueryString[ParamKeys.GroupId] != null) + { + this.Forums = this.Forums.Where(f => f.ForumGroupId == Convert.ToInt32(this.Request.QueryString[ParamKeys.GroupId])).OrderBy(f => f.ForumGroup?.SortOrder).ThenBy(f => f.SortOrder).ToList(); + } + else + { + this.Forums = this.Forums.OrderBy(f => f.ForumGroup?.SortOrder).ThenBy(f => f.SortOrder).ToList(); + } string sGroupName = (this.ForumGroupId != -1 && this.Forums?.Count > 0) ? this.Forums?.FirstOrDefault().GroupName : string.Empty; string sCrumb = (this.ForumGroupId != -1 && this.Forums?.Count > 0) ? "