1
0
mirror of synced 2025-12-23 21:07:12 -05:00

updates now that siteTree paths include language codes

This commit is contained in:
Sarah Schneider
2020-12-14 14:39:45 -05:00
parent 748a715988
commit f5b050dc5e
6 changed files with 32 additions and 42 deletions

View File

@@ -3,7 +3,7 @@
{% if breadcrumb[1].href == '' %}
<span>{{breadcrumb[1].title}}</span>
{% else %}
<a title="{{ breadcrumb[0]}}: {{breadcrumb[1].title}}" href="/{{currentLanguage}}{{breadcrumb[1].href}}" class="d-inline-block {% if breadcrumb[1].href == currentPathWithoutLanguage %}text-gray-light{% endif %}">
<a title="{{ breadcrumb[0]}}: {{breadcrumb[1].title}}" href="{{{breadcrumb[1].href}}" class="d-inline-block {% if breadcrumb[1].href == currentPath %}text-gray-light{% endif %}">
{{breadcrumb[1].title}}</a>
{% endif %}
{% endfor %}

View File

@@ -1,17 +1,17 @@
<ul class="sidebar-categories">
{% for category in product[1].categories %}
<li class="sidebar-category {% if breadcrumbs.category.href == category[1].href %}active{% endif %}">
<a href="/{{currentLanguage}}{{category[1].href}}">{{ category[1].title }}</a>
<a href="{{category[1].href}}">{{ category[1].title }}</a>
<!-- some categories have topics with child articles -->
{% if category[1].maptopics %}
<ul class="sidebar-maptopics">
{% for maptopic in category[1].maptopics %}
<li class="sidebar-maptopic {% if breadcrumbs.maptopic.href == maptopic[1].href %}active{% endif %}">
<a href="/{{currentLanguage}}{{maptopic[1].href}}">{{ maptopic[1].title }}</a>
<a href="{{maptopic[1].href}}">{{ maptopic[1].title }}</a>
<ul class="sidebar-articles">
{% for article in maptopic[1].articles %}
<li class="sidebar-article {% if currentPath == article[1].href %}active{% endif %}">
<a href="/{{currentLanguage}}{{article[1].href}}">{{ article[1].title }}</a>
<a href="{{article[1].href}}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
@@ -23,7 +23,7 @@
<ul class="sidebar-articles">
{% for article in category[1].articles %}
<li class="sidebar-article{% if currentPath == article[1].href %} active{% endif %}">
<a href="/{{currentLanguage}}{{article[1].href}}">{{ article[1].title }}</a>
<a href="{{article[1].href}}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>

View File

@@ -10,12 +10,12 @@
{% include all-products-link %}
<li title="{{product.title}}" class="sidebar-product mb-2">
{% unless page.hidden %}
<a href="/{{currentLanguage}}{{product.href}}" class="pl-4 pr-5 pb-1 f4">{{ product.title }}</a>
<a href="{{product.href}}" class="pl-4 pr-5 pb-1 f4">{{ product.title }}</a>
{% endunless %}
</li>
<ul class="sidebar-categories list-style-none">
{% for category in product.categories %}
{% capture fullPathToCategory %}/{{currentLanguage}}{{category[1].href}}{% endcapture %}
{% capture fullPathToCategory %}{{category[1].href}}{% endcapture %}
<li class="sidebar-category py-1 {% if breadcrumbs.category.href == category[1].href %}active {% if currentPath == fullPathToCategory %}is-current-page {% endif %}{% endif %}{% if category[1].standalone %}standalone-category{% endif %}">
{% if category[1].standalone %}
@@ -37,13 +37,13 @@
<ul class="sidebar-topics list-style-none position-relative">
{% for maptopic in category[1].maptopics %}
{% unless maptopic[1].hidden %}
{% capture fullPathToMaptopic %}/{{currentLanguage}}{{maptopic[1].href}}{% endcapture %}
{% capture fullPathToMaptopic %}{{maptopic[1].href}}{% endcapture %}
<li class="sidebar-maptopic {% if breadcrumbs.maptopic.href == maptopic[1].href %}active {% if currentPath == fullPathToMaptopic %}is-current-page{% endif %}{% endif %}">
<a href="{{fullPathToMaptopic}}" class="pl-4 pr-5 py-2">{{ maptopic[1].title }}</a>
<ul class="sidebar-articles my-2">
{% for article in maptopic[1].articles %}
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
{% capture fullPathToArticle %}{{article[1].href}}{% endcapture %}
<li class="sidebar-article {% if breadcrumbs.article.href == article[1].href %}active {% if currentPath == fullPathToArticle %}is-current-page{% endif %}{% endif %}">
<a href="{{fullPathToArticle}}" class="pl-6 pr-5 py-1{% if forloop.last %} pb-2{% endif %}">{{ article[1].title }}</a>
@@ -58,7 +58,7 @@
{% else %}
<ul class="sidebar-articles list-style-none">
{% for article in category[1].articles %}
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
{% capture fullPathToArticle %}{{article[1].href}}{% endcapture %}
<li class="sidebar-article {% if breadcrumbs.article.href == article[1].href %}active {% if currentPath == fullPathToArticle %}is-current-page{% endif %}{% endif %}">
<a href="{{fullPathToArticle}}" class="pl-4 pr-5 py-1{% if forloop.last %} pb-2{% endif %}">{{ article[1].title }}</a>
</li>