Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

category-articles-list.html 1.7 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  1. {% for categoryPage in currentProductTree.childPages %}
  2. {% if categoryPage.href == currentPath %}{% assign currentCategory = categoryPage %}{% endif %}
  3. {% endfor %}
  4. {% if currentCategory.page.shortTitle and currentCategory.page.shortTitle != '' %}{% assign currentCategoryTitle = currentCategory.page.shortTitle %}{% else %}{% assign currentCategoryTitle = currentCategory.page.title %}{% endif %}
  5. {% assign maxArticles = 10 %}
  6. <div class="py-6 all-articles-list">
  7. <h2 class="font-mktg mb-4" id="all-docs"><a href="#all-docs">{{ currentCategoryTitle }} docs</a></h2>
  8. <div class="d-flex gutter flex-wrap">
  9. {% for childPage in currentCategory.childPages %}
  10. {% unless childPage.page.hidden %}
  11. <div class="col-12 col-lg-4 mb-6 height-full">
  12. <h4 class="mb-3"><a href="{{ childPage.href }}">{{ childPage.page.title }}</a></h4>
  13. <ul class="list-style-none">
  14. {% for grandchildPage in childPage.childPages %}
  15. <li class="mb-3 {% if forloop.index > maxArticles %}d-none{% endif %}">
  16. <a href="{{ grandchildPage.href }}">
  17. {{ grandchildPage.page.title }}
  18. </a>
  19. </li>
  20. {% endfor %}
  21. {% assign numArticles = childPage.childPages | obj_size %}
  22. {% if numArticles > maxArticles %}
  23. <button class="js-all-articles-show-more btn-link Link--secondary">Show {{ numArticles | minus: maxArticles }} more {% octicon "chevron-up" class="v-align-text-bottom" %}</button>
  24. {% endif %}
  25. </ul>
  26. </div>
  27. {% endunless %}
  28. {% endfor %}
  29. </div>
  30. </div>
  31. {% comment %}
  32. <small class="color-text-secondary d-inline-block">
  33. &bull; {{ article.childArticles | obj_size }} articles
  34. </small>
  35. {% endcomment %}
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...