app/template/default/News/index.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. {% extends 'default_frame.twig' %}
  9. {% block main %}
  10.     <div class="ec-searchnavRole">
  11.         <div class="ec-productRole">
  12.             <ol class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList">
  13.                 <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  14.                     <a itemprop="item" href="{{ url('homepage') }}">
  15.                         <span itemprop="name">TOP</span>
  16.                     </a>
  17.                     <meta itemprop="position" content="1"/>
  18.                 </li>
  19.                 <li itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem">
  20.                     <a itemprop="item" href="{{ url('news_index') }}">
  21.                         <span itemprop="name">お知らせ一覧</span>
  22.                     </a>
  23.                     <meta itemprop="position" content="2"/>
  24.                 </li>
  25.             </ol>
  26.         </div>
  27.         {# <div class="ec-searchnavRole__infos">
  28.             <div class="ec-searchnavRole__counter">
  29.                 {% if pagination.totalItemCount > 0 %}
  30.                     {{ '<span class="ec-font-bold">%count%件</span><span>のニュースが見つかりました</span>'|trans({ '%count%': pagination.totalItemCount })|raw }}
  31.                 {% else %}
  32.                     <span>{{ 'まだニュースがありません'|trans }}</span>
  33.                 {% endif %}
  34.             </div>
  35.         </div> #}
  36.     </div>
  37.     <div class="ec-role ec-newsRole">
  38.         {% if pagination.totalItemCount > 0 %}
  39.             {% for News in pagination %}
  40.                 <div class="ec-newsRole__newsHeading ec-newsRole__newsListItem">
  41.                     <div class="ec-newsRole__newsDate">
  42.                         {{ News.publish_date|date("Y/m/d") }}
  43.                     </div>
  44.                     <div class="ec-newsRole__newsColumn">
  45.                         {% if News.url %}
  46.                             <a href="{{ News.url }}" {% if News.link_method == '1' %} target="_blank" {% endif %} class="ec-newsRole__newsTitle">
  47.                             {% else %}
  48.                                 <a href="{{ url('news_detail', {'id': News.id}) }}" class="ec-newsRole__newsTitle">
  49.                                 {% endif %}
  50.                                 <h2 class="ec-newsRole__news-listTitle">{{ News.title }}</h2>
  51.                             </a>
  52.                         </div>
  53.                     </div>
  54.                 {% endfor %}
  55.             {% else %}
  56.                 <div>{{ 'まだニュースはありません。'|trans }}</div>
  57.             {% endif %}
  58.             <div class="ec-pagerRole">
  59.                 {% include "pager.twig" with {'pages': pagination.paginationData} %}
  60.             </div>
  61.         </div>
  62.     {% endblock %}