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') }}">ホーム<i class="fas fa-chevron-right"></i></a></li>
  12.                     <li><a href="{{ url('homepage') }}news/">ニュース<i class="fas fa-chevron-right"></i></a></li>
  13.                     <li><a href="{{ url('homepage') }}products/list">ラインナップ<i class="fas fa-chevron-right"></i></a></li>
  14.                     <li><a href="{{ url('homepage') }}case">導入事例<i class="fas fa-chevron-right"></i></a></li>
  15.                     <li><a href="https://my.ebook5.net/akracing/akracing/" target="_blank">製品カタログ<i class="fas fa-chevron-right"></i></a></li>
  16.                     <li><a href="{{ url('homepage') }}gallery">ムービー<i class="fas fa-chevron-right"></i></a></li>
  17.                     <li><a href="{{ url('homepage') }}support">サポート<i class="fas fa-chevron-right"></i></a></li>
  18.                     <li><a href="{{ url('homepage') }}shop">販売店<i class="fas fa-chevron-right"></i></a></li>
  19.                     {# <li><a href="{{ url('homepage') }}contact">CONTACT<i class="fas fa-chevron-right"></i></a></li> #}
  20.                     {# 20230705@hanari 直販リンク追加 #}
  21.                     <li class="navi-amazon"><a href="https://www.amazon.co.jp/akracing/" target="_blank">Amazonで購入<i class="fas fa-chevron-right"></i></a></li>
  22.         </ul>
  23.     </div><!-- .ec-itemNav -->
  24. </div>
  25. {#
  26. {% set Categories = repository('Eccube\\Entity\\Category').getList() %}
  27. {% macro tree(Category) %}
  28.     {% from _self import tree %}
  29.     <a href="{{ url('product_list') }}?category_id={{ Category.id }}">
  30.         {{ Category.name }}
  31.     </a>
  32.     {% if Category.children|length > 0 %}
  33.         <ul>
  34.             {% for ChildCategory in Category.children %}
  35.                 <li>
  36.                     {{ tree(ChildCategory) }}
  37.                 </li>
  38.             {% endfor %}
  39.         </ul>
  40.     {% endif %}
  41. {% endmacro %}
  42. #}
  43. {# @see https://github.com/bolt/bolt/pull/2388 #}
  44. {#
  45. {% from _self import tree %}
  46. <div class="ec-headerCategoryArea">
  47.     <div class="ec-headerCategoryArea__heading">
  48.         <p>{{ 'カテゴリ一覧'|trans }}</p>
  49.     </div>
  50.     <div class="ec-itemNav">
  51.         <ul class="ec-itemNav__nav">
  52.             {% for Category in Categories %}
  53.                 <li>
  54.                     {{ tree(Category) }}
  55.                 </li>
  56.             {% endfor %}
  57.         </ul>
  58.     </div>
  59. </div>
  60. #}