{% macro getCategoryImage(category) %}
{% if category.category_image %}
{{ asset(category.category_image|no_image_product, 'save_image') }}
{% elseif category.Parent %}
{{ _self.getCategoryImage(category.Parent) }}
{% else %}
{{ asset('/html/user_data/assets/img/headimg.png') }}
{% endif %}
{% endmacro %}
{% import _self as macros %}
<div class="category-head">
<img src="{{ macros.getCategoryImage(Category) }}" alt="{{ Category.name }}">
</div>
<div class="cat-name-box">
{% if Category %}
{% for Path in Category.path %}
{% if loop.last %}
<div class="cat-name-sbox"><p>{{ Path.name }}</p></div>
{% endif %}
{% endfor %}
{% endif %}
</div>