Skip to content

Commit

Permalink
Add new breadcrumbs' contents
Browse files Browse the repository at this point in the history
  • Loading branch information
pxska committed Feb 8, 2022
1 parent e908676 commit 077ecb3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions components/menu-breadcrumbs-sd.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{%- assign breadcrumbsString = breadcrumbsScript | replace: '<script type="application/ld+json">', '' | replace: "</script>", '' | replace: site.url, '' | replace: '@', '' -%}
{%- assign breadcrumbsObj = breadcrumbsString | json_parse -%}

<ul class="menu menu-item-list{% if sidebar_active and site.root_item.selected? == false %} is-hidden-desktop{% endif %}">
{%- for listItem in breadcrumbsObj.itemListElement %}
{%- assign pageUrl = page.url | remove_first: "/" -%}

<span class="menu-separator">/</span>
<li class="menu-item{% if pageUrl == listItem.item.id %} current{% endif %}">
<a class="menu-link" href="/{{listItem.item.id}}">{{ listItem.item.name }}</a>
</li>
{% endfor -%}
</ul>

0 comments on commit 077ecb3

Please sign in to comment.