@model ForumBreadcrumbModel
@using Nop.Core.Domain.Common
@inject CommonSettings commonSettings
@{
    var breadcrumbDelimiter = commonSettings.BreadcrumbDelimiter;
}
<div class="breadcrumb forum-breadcrumb">
    <ul>
        <li class="breadcrumb-item">
            <a href="@Url.RouteUrl("Homepage")" title="@T("Forum.Breadcrumb.HomeTitle")">@T("Forum.Home")</a>
        </li>
        <li class="breadcrumb-item active">
            <span class="delimiter">@breadcrumbDelimiter</span>
            @Html.RouteLink(T("Forum.Forums").Text, "Boards", null, new { title = T("Forum.Breadcrumb.ForumHomeTitle") })
        </li>
        @if (Model.ForumGroupId > 0)
        {
            <li class="breadcrumb-item">
                <span class="delimiter">@breadcrumbDelimiter</span>
                @Html.RouteLink(Model.ForumGroupName, "ForumGroupSlug",
                new { id = Model.ForumGroupId, slug = Model.ForumGroupSeName },
                new { title = $"{T("Forum.Breadcrumb.ForumGroupTitle")}: {Model.ForumGroupName} " })
            </li>        
        }
        @if (Model.ForumId > 0)
        {
            <li class="breadcrumb-item">
                <span class="delimiter">@breadcrumbDelimiter</span>
                @Html.RouteLink(Model.ForumName, "ForumSlug",
                new { id = Model.ForumId, slug = Model.ForumSeName },
                new { title = $"{T("Forum.Breadcrumb.ForumTitle")}: {Model.ForumName} " })
            </li>
        }
        @if (Model.ForumTopicId > 0)
        {
            <li class="breadcrumb-item">
                <span class="delimiter">@breadcrumbDelimiter</span>
                @Html.RouteLink(Model.ForumTopicSubject, "TopicSlug",
                new { id = Model.ForumTopicId, slug = Model.ForumTopicSeName },
                new { title = $"{T("Forum.Breadcrumb.TopicTitle")}: {Model.ForumTopicSubject} " })
            </li>
        }
    </ul>
</div>