<div class="list-group list-categories">
  <h3>{{ heading_title }}</h3>
  <div class="list-categories-content">
  {% for category in categories %}
  {% if category.category_id == category_id %} 
  <a href="{{ category.href }}" class="list-group-item active">{{ category.name }}</a> 
  {% if category.children %}
  {% for child in category.children %}
  {% if child.category_id == child_id %}
  <a href="{{ child.href }}" class="list-group-item child active">{{ child.name }}</a> 
  {% else %} 
  <a href="{{ child.href }}" class="list-group-item child">{{ child.name }}</a>
  {% endif %}
  {% endfor %}
  {% endif %}
  {% else %} <a href="{{ category.href }}" class="list-group-item">{{ category.name }}</a>
  {% endif %}
  {% endfor %}
  </div>
</div>
