Categories Navigation Standard Section

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

Written By Guilherme de Andrade Arantes (Administrator)

Updated at May 20th, 2020

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?