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.     <ul class="ec-pager">
  10.         
  11.         {# 1ページリンクが表示されない場合、「...」を表示 #}
  12.         {% if pages.firstPageInRange != 1 %}
  13.             <li class="ec-pager__item">...</li>
  14.         {% endif %}
  15.         {% for page in pages.pagesInRange %}
  16.             {% if page == pages.current %}
  17.                 <li class="ec-pager__item--active"><a href="{{ path(
  18.                     app.request.attributes.get('_route'),
  19.                     app.request.query.all|merge({'pageno': page})) }}"> {{ page }} </a></li>
  20.             {% else %}
  21.                 <li class="ec-pager__item"><a href="{{ path(
  22.                     app.request.attributes.get('_route'),
  23.                     app.request.query.all|merge({'pageno': page})) }}"> {{ page }} </a></li>
  24.             {% endif %}
  25.         {% endfor %}
  26.         {# 最終ページリンクが表示されない場合、「...」を表示 #}
  27.         {% if pages.last != pages.lastPageInRange %}
  28.             <li class="ec-pager__item">...</li>
  29.         {% endif %}
  30.     </ul>
  31. {% endif %}