app/template/magamar/Block/category_nav_pc.twig line 1

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  4. http://www.ec-cube.co.jp/
  5. For the full copyright and license information, please view the LICENSE
  6. file that was distributed with this source code.
  7. #}
  8. {% set Categories = repository('Eccube\\Entity\\Category').getList() %}
  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. {% endmacro %}
  15. {# @see https://github.com/bolt/bolt/pull/2388 #}
  16. {% from _self import tree %}
  17. <div class="ec-categoryNaviRole">
  18.     <div class="ec-categoryNaviHeader">
  19.         <h2>カテゴリから探す</h2>
  20.     </div>
  21.     <div class="ec-itemNav">
  22.         <ul class="ec-itemNav__nav">
  23.                 <li>
  24.                     <a href="{{ url('product_list') }}">すべて</a>
  25.                     <i class="fa fa-angle-right"></i>
  26.                 </li>
  27.             {% for Category in Categories %}
  28.                 <li>
  29.                     {{ tree(Category) }}
  30.                     <i class="fa fa-angle-right"></i>
  31.                 </li>
  32.             {% endfor %}
  33.         </ul>
  34.     </div>
  35. </div>