{#
This file is part of EC-CUBE
Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
http://www.ec-cube.co.jp/
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
#}
{% set Categories = repository('Eccube\\Entity\\Category').getList() %}
{# {% macro tree(Category) %}
{% from _self import tree %}
{% for test in cat_category.Children.snapshot %}
<a href="{{ url('product_list') }}?category_id={{ test.id }}">
{{ test.name }}
</a>
{% if test.children|length > 0 %}
<ul>
{% for ChildCategory in test.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endmacro %} #}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{# {% from _self import tree %}
{% for Category in Categories %}
{{ tree(Category) }}
{% endfor %}
#}
{% set cat_category = repository("Eccube\\Entity\\Category").find(cat_id_category) %}
<div class="ec-headerCategoryArea">
<div class="ec-headerCategoryArea__heading">
<p>{{ 'カテゴリ一覧'|trans }}</p>
</div>
<div class="ec-itemNav">
<ul class="ec-itemNav__nav">
<li>
{% for c in cat_category.Children.snapshot %}
<div
v-on:click="side_cat_toggle({{ c.id }})"
class="parent_block">
<a href="" >
<span>
{{ c.name }}
</span>
</a>
</div>
<transition name="fade">
<div class="child_block" v-show="show_contents.indexOf({{ c.id }}) >= 0">
{% for ChildCategory in c.children %}
<a href="{{ url('product_list') }}?category_id={{ ChildCategory.id }}">
<span>
{{ ChildCategory.name }}
</span>
</a>
{% endfor %}
</div>
</transition>
{% endfor %}
</li>
</ul>
</div>
</div>