Skip to content

Commit

Permalink
Fix links to articles/products/categories (github#17761)
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonEtco authored Feb 10, 2021
1 parent b4f73d9 commit b177927
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions layouts/dev-toc.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,22 @@ <h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versio
<details class="mb-1"><summary>{{product[1].title}}</summary>
<ul class="products-list">
<li title="{{product[1].title}}">
<a href="/{{currentLanguage}}{{product[1].href}}">{{ product[1].title }}</a>
<a href="{{product[1].href}}">{{ product[1].title }}</a>
{% for category in product[1].categories %}
{% capture fullPathToCategory %}/{{currentLanguage}}{{category[1].href}}{% endcapture %}
<ul>
<li>
<a href="{{fullPathToCategory}}">{{ category[1].title }}</a>
<a href="{{ category[1].href }}">{{ category[1].title }}</a>
<!-- some categories have maptopics with child articles -->
{% if category[1].maptopics %}
<ul">
<ul>
{% for maptopic in category[1].maptopics %}
{% unless maptopic[1].hidden %}
{% capture fullPathToMaptopic %}/{{currentLanguage}}{{maptopic[1].href}}{% endcapture %}

<li>
<a href="{{fullPathToMaptopic}}">{{ maptopic[1].title }}</a>
<a href="{{ maptopic[1].href }}">{{ maptopic[1].title }}</a>
<ul>
{% for article in maptopic[1].articles %}
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}

<li>
<a href="{{fullPathToArticle}}">{{ article[1].title }}</a>
<a href="{{ article[1].href }}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
Expand All @@ -60,10 +55,9 @@ <h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versio
{% else %}
<ul>
{% for article in category[1].articles %}
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
<li>
<a href="{{fullPathToArticle}}">{{ article[1].title }}</a>
</li>
<li>
<a href="{{ article[1].href }}">{{ article[1].title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
Expand Down

0 comments on commit b177927

Please sign in to comment.