Categories Navigation Standard Section

This is the list of all the categories under the Knowledge Base

5217a53eb06396a4f9289ae6941cef62

Written By Guilherme de Andrade Arantes (Administrator)

Updated at October 21st, 2017

Users might not be searching using the search bar: They may want to navigate through the categories links and its subcategories links.

This is how you can create a simple Categories Navigation Section displaying all questions inside them:

<ul id="main_navigation">
{% for categories in roots_categories %}
  <li class="category_item">
    <h2>{{ category.name }}</h2>
    {% if category.questions.size > 0 %}
      <ul class="question_list">
        {% for question in category.question %}
          <li><a href="{{ question.url }}">{{ question.name }}</a>
        {% endfor %}
      </ul>
    {% endif %}
  </li>
{% endfor %}
</ul>

Was this article helpful?