Skip to content

Commit b177927

Browse files
authored
Fix links to articles/products/categories (#17761)
1 parent b4f73d9 commit b177927

1 file changed

Lines changed: 8 additions & 14 deletions

File tree

layouts/dev-toc.html

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,22 @@ <h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versio
2828
<details class="mb-1"><summary>{{product[1].title}}</summary>
2929
<ul class="products-list">
3030
<li title="{{product[1].title}}">
31-
<a href="/{{currentLanguage}}{{product[1].href}}">{{ product[1].title }}</a>
31+
<a href="{{product[1].href}}">{{ product[1].title }}</a>
3232
{% for category in product[1].categories %}
33-
{% capture fullPathToCategory %}/{{currentLanguage}}{{category[1].href}}{% endcapture %}
3433
<ul>
3534
<li>
36-
<a href="{{fullPathToCategory}}">{{ category[1].title }}</a>
35+
<a href="{{ category[1].href }}">{{ category[1].title }}</a>
3736
<!-- some categories have maptopics with child articles -->
3837
{% if category[1].maptopics %}
39-
<ul">
38+
<ul>
4039
{% for maptopic in category[1].maptopics %}
4140
{% unless maptopic[1].hidden %}
42-
{% capture fullPathToMaptopic %}/{{currentLanguage}}{{maptopic[1].href}}{% endcapture %}
43-
4441
<li>
45-
<a href="{{fullPathToMaptopic}}">{{ maptopic[1].title }}</a>
42+
<a href="{{ maptopic[1].href }}">{{ maptopic[1].title }}</a>
4643
<ul>
4744
{% for article in maptopic[1].articles %}
48-
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
49-
5045
<li>
51-
<a href="{{fullPathToArticle}}">{{ article[1].title }}</a>
46+
<a href="{{ article[1].href }}">{{ article[1].title }}</a>
5247
</li>
5348
{% endfor %}
5449
</ul>
@@ -60,10 +55,9 @@ <h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versio
6055
{% else %}
6156
<ul>
6257
{% for article in category[1].articles %}
63-
{% capture fullPathToArticle %}/{{currentLanguage}}{{article[1].href}}{% endcapture %}
64-
<li>
65-
<a href="{{fullPathToArticle}}">{{ article[1].title }}</a>
66-
</li>
58+
<li>
59+
<a href="{{ article[1].href }}">{{ article[1].title }}</a>
60+
</li>
6761
{% endfor %}
6862
</ul>
6963
{% endif %}

0 commit comments

Comments
 (0)