@@ -24,40 +24,69 @@ <h2 class="mt-3 mb-3"><abbr>TOC</abbr> for {{ allVersions[currentVersion].versio
2424< button class ="btn mb-3 js-expand " type ="button "> Expand All</ button >
2525< div />
2626
27+ {% assign maxTocDepth = 5 %}
28+
2729{% for productPage in currentEnglishTree.childPages %}
28- {% assign productId = productPage.page.relativePath | replace: "/index.md", "" %}
29- {% if defaultOpenSections contains productId %}
30- < details open class ="mb-1 "> < summary > {{productPage.renderedFullTitle}}</ summary >
31- {% else %}
32- < details class ="mb-1 "> < summary > {{productPage.renderedFullTitle}}</ summary >
33- {% endif %}
34- < ul class =" products-list " >
35- < li title =" {{productPage.renderedFullTitle}} " style =" margin: 3px 0 0 30px; ">
36- < a title ="{{ productPage.page.documentType }} " href =" {{ docsRoot }}{{productPage.href}} " > {{ productPage.renderedFullTitle }} </ a >
37- {% for categoryPage in productPage.childPages %}
38- < ul >
39- < li style =" margin: 3px 0 0 30px; " >
40- < a title =" {{ categoryPage.page.documentType }} " href =" {{ docsRoot }}{{ categoryPage.href }} " > {{ categoryPage.renderedFullTitle }} </ a >
41- < ul >
42- {% for subcategoryPage in categoryPage .childPages %}
30+ {% assign productId = productPage.page.relativePath | replace: "/index.md", "" %}
31+ {% if defaultOpenSections contains productId %}
32+ < details open class ="mb-1 "> < summary > {{productPage.renderedFullTitle}}</ summary >
33+ {% else %}
34+ < details class ="mb-1 "> < summary > {{productPage.renderedFullTitle}}</ summary >
35+ {% endif %}
36+
37+ < ul class =" products-list ">
38+ < li title ="{{productPage.renderedFullTitle }} " style =" margin: 3px 0 0 30px; " >
39+ < a title =" {{ productPage.page.documentType }} " href =" {{ docsRoot }}{{ productPage.href}} " > {{ productPage.renderedFullTitle }} </ a >
40+
41+ {% comment %} Unified nested rendering with depth control {% endcomment %}
42+ {% if productPage.childPages and productPage.childPages.size > 0 %}
43+ < ul >
44+ {% for l1 in productPage .childPages %}
4345 < li style ="margin: 3px 0 0 30px; ">
44- < a title ="{{ subcategoryPage.page.documentType }} " href ="{{ docsRoot }}{{ subcategoryPage.href }} "> {{ subcategoryPage.renderedFullTitle }}</ a >
45- < ul >
46- {% for articlePage in subcategoryPage.childPages %}
47- < li style ="margin: 3px 0 0 30px; ">
48- < a title ="{{ articlePage.page.documentType }} " href ="{{ docsRoot }}{{ articlePage.href }} "> {{ articlePage.renderedFullTitle }}</ a >
49- </ li >
50- {% endfor %}
51- </ ul >
46+ < a title ="{{ l1.page.documentType }} " href ="{{ docsRoot }}{{ l1.href }} "> {{ l1.renderedFullTitle }}</ a >
47+ {% if l1.childPages and l1.childPages.size > 0 and maxTocDepth > = 2 %}
48+ < ul >
49+ {% for l2 in l1.childPages %}
50+ < li style ="margin: 3px 0 0 30px; ">
51+ < a title ="{{ l2.page.documentType }} " href ="{{ docsRoot }}{{ l2.href }} "> {{ l2.renderedFullTitle }}</ a >
52+ {% if l2.childPages and l2.childPages.size > 0 and maxTocDepth > = 3 %}
53+ < ul >
54+ {% for l3 in l2.childPages %}
55+ < li style ="margin: 3px 0 0 30px; ">
56+ < a title ="{{ l3.page.documentType }} " href ="{{ docsRoot }}{{ l3.href }} "> {{ l3.renderedFullTitle }}</ a >
57+ {% if l3.childPages and l3.childPages.size > 0 and maxTocDepth > = 4 %}
58+ < ul >
59+ {% for l4 in l3.childPages %}
60+ < li style ="margin: 3px 0 0 30px; ">
61+ < a title ="{{ l4.page.documentType }} " href ="{{ docsRoot }}{{ l4.href }} "> {{ l4.renderedFullTitle }}</ a >
62+ {% if l4.childPages and l4.childPages.size > 0 and maxTocDepth > = 5 %}
63+ < ul >
64+ {% for l5 in l4.childPages %}
65+ < li style ="margin: 3px 0 0 30px; ">
66+ < a title ="{{ l5.page.documentType }} " href ="{{ docsRoot }}{{ l5.href }} "> {{ l5.renderedFullTitle }}</ a >
67+ </ li >
68+ {% endfor %}
69+ </ ul >
70+ {% endif %}
71+ </ li >
72+ {% endfor %}
73+ </ ul >
74+ {% endif %}
75+ </ li >
76+ {% endfor %}
77+ </ ul >
78+ {% endif %}
79+ </ li >
80+ {% endfor %}
81+ </ ul >
82+ {% endif %}
5283 </ li >
53- {% endfor %}
54- </ ul >
55- </ li >
56- {% endfor %}
57- </ ul >
58- </ li >
59- </ ul >
60- </ details >
84+ {% endfor %}
85+ </ ul >
86+ {% endif %}
87+ </ li >
88+ </ ul >
89+ </ details >
6190{% endfor %}
6291{% endif %}
6392
0 commit comments