Breadcrumbs: visible trail + BreadcrumbList JSON-LD
Add SeoJsonLd.Breadcrumb + Crumb record + _Breadcrumbs partial, and wire a trail
into the Jobs/Shifts list (landing) and detail pages: خانه › استخدام/شیفت › {نقش}
› {شهر|عنوان}. The role crumb links to the role landing page (more internal
links), and Google can show the breadcrumb path in results. Detail pages emit it
alongside the existing JobPosting JSON-LD.
Improvement 5 of the backlog (SEO).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
@model IReadOnlyList<JobsMedical.Web.Services.Crumb>
|
||||
@* Visible breadcrumb trail. The last crumb is the current page (no link). Pair with the
|
||||
BreadcrumbList JSON-LD (SeoJsonLd.Breadcrumb) emitted in @@section Head. *@
|
||||
@if (Model is { Count: > 1 })
|
||||
{
|
||||
<nav class="breadcrumbs" aria-label="مسیر">
|
||||
@for (var i = 0; i < Model.Count; i++)
|
||||
{
|
||||
if (i > 0) { <span class="bc-sep" aria-hidden="true">›</span> }
|
||||
@if (!string.IsNullOrEmpty(Model[i].Url) && i < Model.Count - 1)
|
||||
{
|
||||
<a href="@Model[i].Url">@Model[i].Name</a>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="bc-current">@Model[i].Name</span>
|
||||
}
|
||||
}
|
||||
</nav>
|
||||
}
|
||||
Reference in New Issue
Block a user