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

Open in your IDE?
  1. {% set parentCategory = repository('Eccube\\Entity\\Category').findOneBy({'name': 'カテゴリー'}) %}
  2. {% if parentCategory %}
  3.     {% set subCategories = parentCategory.Children %}
  4. {% else %}
  5.     {% set subCategories = [] %}
  6. {% endif %}
  7. <div class="drawer drawer_right"><a class="drawer_right_close spm" href="#"> </a>
  8.     <div class="drawer_group drawer_right_group">
  9.         <div class="drawer_right_top"><a class="drawer_right_close desktop" href="#"> </a>
  10.             <div class="drawer_right_fake"></div>
  11.         </div>
  12.         <h2 class="drawer_right_title">すべての商品を見る</h2>
  13.         <div class="drawer_right_list">
  14.             {% for category in subCategories %}
  15.                 <div class="drawer_right_item">
  16.                     <a class="hover_opacity" href="{{ url('product_list', {'category_id': category.id}) }}">
  17.                         <img class="drawer_right_item_img" src="{{ asset('assets/img/categories/', 'user_data') }}category-{{ category.id }}.png" alt="{{ category.name }}" />
  18.                         <span>{{ category.name }}</span>
  19.                     </a>
  20.                 </div>
  21.             {% else %}
  22.                 <p>カテゴリが見つかりません。</p>
  23.             {% endfor %}
  24.         </div>
  25.     </div>
  26. </div>