{#
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 %}
<a href="{{ url('product_list') }}?category_id={{ Category.id }}">
{{ Category.name }}
</a>
{% if Category.children|length > 0 %}
<ul>
{% for ChildCategory in Category.children %}
<li>
{{ tree(ChildCategory) }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endmacro %}
{# @see https://github.com/bolt/bolt/pull/2388 #}
{% from _self import tree %}
<div class="ec-categoryNaviRole">
<div class="ec-itemNav">
<ul class="ec-itemNav__nav">
<li>
<a href="{{ url('product_list') }}">全商品</a>
</li>
<!-- カテゴリが多いため、カテゴリ一覧の上位3のみを表示するカスタマイズ-->
{% set breakLoop = false %}
{% set roop_count = 0 %}
{% for Category in Categories if breakLoop == false %}
<li>
{{ tree(Category) }}
</li>
{% set roop_count = roop_count + 1 %}
{% if roop_count > 2 %}
{% set breakLoop = true %}
{% endif %}
<!--カスタマイズここまで-->
{% endfor %}
<li>
<a href="{{ url('feature_detail', {'url': 'souryou_muryou'}) }}">お得なメール便</a>
</li>
<li>
<a class="target-link" href="https://www.iizuka-nori.co.jp/column/" target="_blank">コラム</a>
</li>
</ul>
</div>
</div>