OctoberCMS
0
Вклад в тег
{% set obCategoryList = CategoryList.make().tree() %}
{% if obCategoryList.isNotEmpty() %}
<ul class="product__about-usage">
{% for obCategory in obCategoryList %}
{% if obCategory.children.isNotEmpty() %}
{% for obChildCategory in obCategory.children %}
<li class="product__about-usage-item">
<div class="product__about-usage-descr">
<img class="product__about-usage-ico" src="{{ obChildCategory.preview_image.path }}" aria-hidden="true">
<span class="product__about-usage-title">{{ obChildCategory.name }}</span>
</div>
</li>
{% endfor %}
{% endif %}
{% endfor %}
</ul>
{% endif %}