Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Breadcrumbs - minor changes

DanielŻuławski7d054fbb88f4
diff --git a/src/Web/Grand.Web/Views/Catalog/CategoryLayout.GridOrLines.cshtml b/src/Web/Grand.Web/Views/Catalog/CategoryLayout.GridOrLines.cshtml
index e834402d6..4625a5638 100644
--- a/src/Web/Grand.Web/Views/Catalog/CategoryLayout.GridOrLines.cshtml
+++ b/src/Web/Grand.Web/Views/Catalog/CategoryLayout.GridOrLines.cshtml
@@ -23,35 +23,48 @@
var count = 0;
- <div class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
- <a class="breadcrumb-item" href="@Url.RouteUrl("HomePage")" title="@Loc["Categories.Breadcrumb.Top"]">
- <b-icon icon="house-door" scale="1.25" shift-v="1.25" aria-hidden="true"></b-icon>
- @Loc["Categories.Breadcrumb.Top"]
- </a>
+ <ol class="breadcrumb" itemscope itemtype="http://schema.org/BreadcrumbList">
+ <li class="breadcrumb-item" itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
+ <a href="@Url.RouteUrl("HomePage")" title="@Loc["Categories.Breadcrumb.Top"]">
+ <b-icon icon="house-door" scale="1.25" shift-v="1.25" aria-hidden="true"></b-icon>
+ <span itemprop="name">@Loc["Products.Breadcrumb.Top"]</span>
+ <span itemprop="item" itemscope itemtype="http://schema.org/Thing"
+ id="@Url.RouteUrl("HomePage")">
+ </span>
+ <meta itemprop="position" content="@count" />
+ </a>
+ </li>
@foreach (var cat in Model.CategoryBreadcrumb)
{
count++;
var isLastCategory = cat.Id == Model.Id;
@if (isLastCategory)
{
- <a class="breadcrumb-item" active>
- <strong class="current-item" itemprop="name">@cat.Name</strong>
- <span itemprop="item" itemscope itemtype="http://schema.org/Thing"
- id="@Url.RouteUrl("Category", new {SeName = cat.SeName})">
- </span>
- <meta itemprop="position" content="@count" />
- </a>
+ <li class="breadcrumb-item active" itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
+ <a>
+ <strong class="current-item" itemprop="name">@cat.Name</strong>
+ <span itemprop="item" itemscope itemtype="http://schema.org/Thing"
+ id="@Url.RouteUrl("Category", new {SeName = cat.SeName})">
+ </span>
+ <meta itemprop="position" content="@count" />
+ </a>
+ </li>
}
else
{
- <a class="breadcrumb-item" href="@Url.RouteUrl("Category", new { SeName = cat.SeName })" title="@cat.Name" itemprop="item">
- @cat.Name
- <meta itemprop="position" content="@count" />
- </a>
+ <li class="breadcrumb-item" itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem">
+ <a href="@Url.RouteUrl("Category", new { SeName = cat.SeName })" title="@cat.Name" itemprop="item">
+ <span itemprop="name">@cat.Name</span>
+ <span itemprop="item" itemscope itemtype="http://schema.org/Thing"
+ id="@Url.RouteUrl("Category", new { SeName = cat.SeName })">
+ </span>
+ <meta itemprop="position" content="@count" />
+ </a>
+ </li>
}
}
- </div>
+ </ol>
@await Component.InvokeAsync("Widget", new { widgetZone = "categorydetails_after_breadcrumb", additionalData = Model.Id })
}
diff --git a/src/Web/Grand.Web/Views/Product/_Breadcrumbs.cshtml b/src/Web/Grand.Web/Views/Product/_Breadcrumbs.cshtml
index 335f33b3f..8286aeef1 100644
--- a/src/Web/Grand.Web/Views/Product/_Breadcrumbs.cshtml
+++ b/src/Web/Grand.Web/Views/Product/_Breadcrumbs.cshtml
@@ -9,6 +9,9 @@
<a href="@Url.RouteUrl("HomePage")" target="_self">
<b-icon icon="house-door" scale="1.25" shift-v="1.25" aria-hidden="true"></b-icon>
<span itemprop="name">@Loc["Products.Breadcrumb.Top"]</span>
+ <span itemprop="item" itemscope itemtype="http://schema.org/Thing"
+ id="@Url.RouteUrl("HomePage")">
+ </span>
<meta itemprop="position" content="@count" />
</a>
</li>
@@ -18,6 +21,9 @@
<li itemprop="itemListElement" itemscope="itemscope" itemtype="http://schema.org/ListItem" class="breadcrumb-item">
<a href="@Url.RouteUrl("Category", new { SeName = category.SeName })" target="_self">
<span itemprop="name">@category.Name</span>
+ <span itemprop="item" itemscope itemtype="http://schema.org/Thing"
+ id="@Url.RouteUrl("Category", new { SeName = category.SeName })">
+ </span>
<meta itemprop="position" content="@count" />
</a>
</li>