@model IEnumerable @{ ViewBag.Title = "Forums"; bool noForums = true; }

Welcome to the forums.

@foreach (var cat in Model) { if (ACL.CanSee(User?.Identity?.Name, cat.Id)) { noForums = false; @foreach (var subcat in cat.Children) { if (ACL.CanSee(User?.Identity?.Name, subcat.Id)) { } }
@cat.Name Topics Posts Most Recent Post
@Html.ActionLink(subcat.Name, "ViewForum", "Forum", new { id = subcat.Id }, null)

@subcat.Description

@if (subcat.Children.Length > 0) {

Subforums: @foreach (var subfrm in subcat.Children) { if (ACL.CanSee(User?.Identity?.Name, subfrm.Id)) { @Html.ActionLink(subfrm.Name, "ViewForum", "Forum", new { id = subfrm.Id }, null)  } }

}
@subcat.Topics.Length
} } @if(noForums == true) {

No forums to show! There are no forums that you have read access to. If you are a guest, please @Html.ActionLink("log in", "Login", "Account"). If not, please contact an admin.

}