app/template/akracing/Block/category_nav_sp.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. <div class="ec-headerCategoryArea">
  9.     <div class="ec-itemNav">
  10.         <ul class="ec-itemNav__nav">
  11.                     <li class="home"><a href="{{ url('homepage') }}">HOME<i class="fas fa-chevron-right"></i></a></li>
  12.                     <li><a href="{{ url('homepage') }}news/">NEWS<i class="fas fa-chevron-right"></i></a></li>
  13.                     <li><a href="{{ url('homepage') }}products/list">PRODUCTS<i class="fas fa-chevron-right"></i></a></li>
  14.                     <li><a href="https://my.ebook5.net/akracing/akracing/" target="_blank">CATALOG<i class="fas fa-chevron-right"></i></a></li>
  15.                     <li><a href="{{ url('homepage') }}support">SUPPORT<i class="fas fa-chevron-right"></i></a></li>
  16.                     <li><a href="{{ url('homepage') }}shop">SHOP LIST<i class="fas fa-chevron-right"></i></a></li>
  17.                     {# <li><a href="{{ url('homepage') }}contact">CONTACT<i class="fas fa-chevron-right"></i></a></li> #}
  18.                     {# 20230705@hanari 直販リンク追加 #}
  19.                     <li class="navi-amazon"><a href="https://www.amazon.co.jp/akracing/" target="_blank">Amazonで購入<i class="fas fa-chevron-right"></i></a></li>
  20.         </ul>
  21.     </div><!-- .ec-itemNav -->
  22. </div>
  23. {#
  24. {% set Categories = repository('Eccube\\Entity\\Category').getList() %}
  25. {% macro tree(Category) %}
  26.     {% from _self import tree %}
  27.     <a href="{{ url('product_list') }}?category_id={{ Category.id }}">
  28.         {{ Category.name }}
  29.     </a>
  30.     {% if Category.children|length > 0 %}
  31.         <ul>
  32.             {% for ChildCategory in Category.children %}
  33.                 <li>
  34.                     {{ tree(ChildCategory) }}
  35.                 </li>
  36.             {% endfor %}
  37.         </ul>
  38.     {% endif %}
  39. {% endmacro %}
  40. #}
  41. {# @see https://github.com/bolt/bolt/pull/2388 #}
  42. {#
  43. {% from _self import tree %}
  44. <div class="ec-headerCategoryArea">
  45.     <div class="ec-headerCategoryArea__heading">
  46.         <p>{{ 'カテゴリ一覧'|trans }}</p>
  47.     </div>
  48.     <div class="ec-itemNav">
  49.         <ul class="ec-itemNav__nav">
  50.             {% for Category in Categories %}
  51.                 <li>
  52.                     {{ tree(Category) }}
  53.                 </li>
  54.             {% endfor %}
  55.         </ul>
  56.     </div>
  57. </div>
  58. #}