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

Open in your IDE?
  1. {#
  2. This file is part of EC-CUBE
  3. Copyright(c) Takashi Otaki All Rights Reserved.
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {% if ItemRanking is not empty %}
  8.     <section class="ranking">
  9.         <div class="container">
  10.             {% if Config.item_ranking_title != "" %}
  11.             <h2 class="section-title">
  12.                 <span class="_sub">
  13.                     RANKING
  14.                 </span>
  15.                 <span class="_main">
  16.                     {{ Config.item_ranking_title }}
  17.                 </span>
  18.             </h2>
  19.             {% endif %}
  20.             <div class="ranking__content">
  21.                 <div class="ranking__list">
  22.                 {% for item in ItemRanking %}
  23.                 
  24.                     <a class="ranking__item card-rank" href="{{ url('product_detail', {'id': item.id}) }}">
  25.                         {% if Config.item_ranking_disp_title == 1 %}
  26.                             <div class="card-rank__rank">   
  27.                                 <span class="num">
  28.                                     {{ loop.index }}
  29.                                 </span>
  30.                                 位
  31.                             </div>
  32.                         {% endif %}
  33.                         {% for image in item.ProductImage %}
  34.                             {% if loop.first %}
  35.                             <div class="card-rank__img">
  36.                                 <img src="{{ asset(image, 'save_image') }}">
  37.                             </div>
  38.                             {% endif %}
  39.                         {% else %}
  40.                             <div class="card-rank__img">
  41.                                 <img src="{{ asset(''|no_image_product, 'save_image') }}"/>
  42.                             </div>
  43.                         {%endfor%}
  44.                         {% if Config.item_ranking_disp_title == 1 %}
  45.                             <h3 class="card-rank__title">
  46.                                 {{ item.name }} 
  47.                             </h3>
  48.                         {% endif %}
  49.                         {% if item.author_name %}
  50.                             <p class="card-rank__author">
  51.                                 著者:{{ item.author_name|raw|nl2br }}
  52.                             </p>
  53.                         {% endif %}
  54.                     </a>
  55.                 {% endfor %}
  56.                 </div>
  57.             </div>
  58.         </div>
  59.     </section>
  60. {% endif %}