app/template/default/pager.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. {% if pages.pageCount > 1 %}
  9.   <div class="news__pagination pagination">
  10.     {# 前へ #}
  11.     {% if pages.previous is defined %}
  12.       <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.previous})) }}" class="pagination__prev">
  13.         <img src="/assets/img/icon-chevron-left.svg" alt="PREV" />
  14.       </a>
  15.     {% endif %}
  16.     {# 1ページリンクが表示されない場合、「...」を表示 #}
  17.     {% if pages.firstPageInRange != 1 %}
  18.       <span class="ec-pager__item">...</span>
  19.     {% endif %}
  20.     {% for page in pages.pagesInRange %}
  21.       {% if page == pages.current %}
  22.         <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="pagination__page active">{{ page }}</a>
  23.       {% else %}
  24.         <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': page})) }}" class="pagination__page">{{ page }}</a>
  25.       {% endif %}
  26.     {% endfor %}
  27.     {# 最終ページリンクが表示されない場合、「...」を表示 #}
  28.     {% if pages.last != pages.lastPageInRange %}
  29.       <span class="ec-pager__item">...</span>
  30.     {% endif %}
  31.     {# 次へ #}
  32.     {% if pages.next is defined %}
  33.       <a href="{{ path(app.request.attributes.get('_route'), app.request.query.all|merge({'pageno': pages.next})) }}" class="pagination__next">
  34.         <img src="/assets/img/icon-chevron-right.svg" alt="NEXT" />
  35.       </a>
  36.     {% endif %}
  37.   </div>
  38. {% endif %}