Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

_ProductBreadcrumb.cshtml

@model ProductDetailsModel.ProductBreadcrumbModel

@using Nop.Core.Domain.Catalog
@using Nop.Core.Domain.Common

@inject CommonSettings commonSettings

@{
    var breadcrumbDelimiter = commonSettings.BreadcrumbDelimiter;
    
    NopHtml.AddJsonLdParts(Model.JsonLd);
}
@if (Model.Enabled)
{
    <div class="breadcrumb">
        <ul>
            @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductBreadcrumbBefore, additionalData = Model })
            <li>
                <span>
                    <a href="@Url.RouteUrl(NopRouteNames.General.HOMEPAGE)">
                        <span>@T("Products.Breadcrumb.Top")</span>
                    </a>
                </span>
                <span class="delimiter">@breadcrumbDelimiter</span>
            </li>            
            @foreach (var category in Model.CategoryBreadcrumb)
            {
                <li>
                    <a href="@(await NopUrl.RouteGenericUrlAsync<Category>(new { SeName = category.SeName }))">
                        <span>@category.Name</span>
                    </a>
                    <span class="delimiter">@breadcrumbDelimiter</span>
                </li>
            }
            <li>
                <strong class="current-item">@Model.ProductName</strong>
                <span id="@(await NopUrl.RouteGenericUrlAsync<Product>(new { SeName = Model.ProductSeName }))"></span>
                @await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = PublicWidgetZones.ProductBreadcrumbAfter, additionalData = Model })
            </li>
        </ul>
    </div>
}