@model ManufacturerModel
@using Nop.Core
@using Nop.Core.Domain.Catalog
@using Nop.Core.Domain.Seo
@inject IWebHelper webHelper
@inject SeoSettings seoSettings
@{
    Layout = "_ColumnsTwo";

    //title
    NopHtml.AddTitleParts(!string.IsNullOrEmpty(Model.MetaTitle) ? Model.MetaTitle : Model.Name);
    //meta
    NopHtml.AddMetaDescriptionParts(Model.MetaDescription);
    NopHtml.AddMetaKeywordParts(Model.MetaKeywords);
    //page class
    NopHtml.AppendPageCssClassParts("html-manufacturer-page");

    if (seoSettings.CanonicalUrlsEnabled)
    {
        var manufacturerUrl = Url.RouteUrl<Manufacturer>(new { SeName = Model.SeName }, webHelper.GetCurrentRequestProtocol()).ToLowerInvariant();
        NopHtml.AddCanonicalUrlParts(manufacturerUrl, seoSettings.QueryStringInCanonicalUrlsEnabled);
    }
}
@section CatalogFilters {
    @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ManufacturerDetailsBeforeFilters, additionalData = Model })
    @await Html.PartialAsync("_CatalogFilters", Model.CatalogProductsModel)
}
<div class="page manufacturer-page">
    <div class="page-title panel-heading">
        <h1>@Model.Name</h1>
    </div>
    <div class="page-body">
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ManufacturerDetailsTop, additionalData = Model })
        @*description*@
        @if (!string.IsNullOrWhiteSpace(Model.Description))
        {
            <div class="manufacturer-description">
                @Html.Raw(Model.Description)
            </div>
        }
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ManufacturerDetailsBeforeFeaturedProducts, additionalData = Model })
        @*featured products*@
        @if (Model.FeaturedProducts.Count > 0)
        {
            <div class="product-grid featured-product-grid">
                <div class="page-title panel-heading">
                    <h1>@T("Products.FeaturedProducts")</h1>
                </div>
                <div class="product-grid">
                    <div class="row item-grid">
                        @foreach (var product in Model.FeaturedProducts)
                        {
                            <div class="item-box col-xs-12 col-sm-4 col-md-4 product-align">
                                <div class="thumbnail">
                                    @await Html.PartialAsync("_ProductBox", product)
                                </div>
                            </div>
                        }
                    </div>
                </div>
            </div>
        }
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ManufacturerDetailsAfterFeaturedProducts, additionalData = Model })
        @await Html.PartialAsync("_CatalogSelectors", Model.CatalogProductsModel)
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ManufacturerDetailsBeforeProductList, additionalData = Model })
        @*product grid and list*@
        <div class="pager clearfix">
            @{
                var catalogProductsViewData = new ViewDataDictionary(ViewData);
                catalogProductsViewData["fetchUrl"] = Html.Raw(Url.RouteUrl("GetManufacturerProducts", new { manufacturerId = Model.Id }));
            }
            @await Html.PartialAsync("_CatalogProducts", Model.CatalogProductsModel, catalogProductsViewData)
        </div>
        @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ManufacturerDetailsBottom, additionalData = Model })
    </div>
</div>
