{##
 # Top categories tree
 #}
<ul class="menu menu-tree{% if not this.isSubtree() %} catalog-categories catalog-categories-tree{% endif %}">
  {% for idx, _category in this.getCategories(this.rootId) %}
    <li {{ this.displayItemClass(idx, loop.length, _category)|raw }}>
      <a href="{{ _category.link }}" {{ this.displayLinkClass(idx, loop.length, _category)|raw }}>{{ _category.name }}</a>
      {% if _category.subcategoriesCount %}
        {{ widget(template=this.getBody(), rootId=_category.id, is_subtree='1') }}
      {% endif %}
    </li>
  {% endfor %}
  {% for idx, w in this.getViewList('topCategories.children', {'rootId': this.getParam('rootId'), 'is_subtree': this.getParam('is_subtree')}) %}
    <li {{ this.displayListItemClass(idx, loop.length, w)|raw }}>{{ w.display() }}</li>
  {% endfor %}
</ul>
