app/template/mizunasu/Block/iseya_category.twig line 1

Open in your IDE?
  1. <h2 class="ttl mincho">商品カテゴリ</h2>
  2.   <ul class="div2 top-cate">
  3.     <li><a href="products/list?category_id=13"><img src="{{ asset('assets/img/common/top-bnnr-a.png') }}" alt=""></a></li>
  4.     <li><a href="products/list?category_id=10"><img src="{{ asset('assets/img/common/top-bnnr-b.png') }}" alt=""></a></li>
  5.   </ul>
  6.   
  7. {% set Categories = repository('Eccube\\Entity\\Category').getList() %}
  8.  
  9. {% macro tree(Category) %}
  10.     {% from _self import tree %}
  11.     <a href="{{ url('product_list') }}?category_id={{ Category.id }}">
  12.         {{ Category.name }}
  13.     </a>
  14.    
  15. {% endmacro %}
  16.  
  17. {# @see https://github.com/bolt/bolt/pull/2388 #}
  18. {% from _self import tree %}
  19. <div class="ec-categoryNaviRole">
  20.     <div class="ec-itemNav">
  21.         <ul class="cate">
  22.             {% for Category in Categories %}
  23.                 <li>
  24.                     {{ tree(Category) }}
  25.                 </li>
  26.             {% endfor %}
  27.         </ul>
  28.     </div>
  29. </div>