app/template/default/category_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="mod_pagenation">
  10.   <ul>
  11.     {# 最初へ #}
  12.     {% if pages.firstPageInRange != 1 %}
  13.     <li class="mod_pagenation__first">
  14.       <a href="{{ path(
  15.         app.request.attributes.get('_route'),
  16.         app.request.query.all|merge({'category_id': app.request.attributes.get('_route_params').category_id, 'pageno': pages.first})) }}">{{ '<<'|trans }}</a>
  17.     </li>
  18.     {% endif %}
  19.     {% if pages.previous is defined %}
  20.     <li class="mod_pagenation__prev">
  21.       <a href="{{ path(
  22.         app.request.attributes.get('_route'),
  23.         app.request.query.all|merge({'category_id': app.request.attributes.get('_route_params').category_id, 'pageno': pages.previous})) }}">{{ '<'|trans }}</a>
  24.     </li>
  25.     {% endif %}
  26.     {# 1ページリンクが表示されない場合、「...」を表示 #}
  27.     {% if pages.firstPageInRange != 1 %}
  28.     <li class=""><span>...</span></li>
  29.     {% endif %}
  30.     {% for page in pages.pagesInRange %}
  31.       {% if page == pages.current %}
  32.       <li class=""><span>{{ page }}</span></li>
  33.       {% else %}
  34.       <li class=""><a href="{{ path(
  35.         app.request.attributes.get('_route'),
  36.         app.request.query.all|merge({'category_id': app.request.attributes.get('_route_params').category_id, 'pageno': page})) }}"> {{ page }} </a></li>
  37.       {% endif %}
  38.     {% endfor %}
  39.     {# 最終ページリンクが表示されない場合、「...」を表示 #}
  40.     {% if pages.last != pages.lastPageInRange %}
  41.     <li class=""><span>...</span></li>
  42.     {% endif %}
  43.     {# 次へ #}
  44.     {% if pages.next is defined %}
  45.       <li class="mod_pagenation__next">
  46.           <a href="{{ path(
  47.           app.request.attributes.get('_route'),
  48.           app.request.query.all|merge({'category_id': app.request.attributes.get('_route_params').category_id, 'pageno': pages.next})) }}">{{ '>'|trans }}</a></li>
  49.     {% endif %}
  50.     {# 最後へ #}
  51.     {% if pages.last != pages.lastPageInRange %}
  52.       <li class="mod_pagenation__last">
  53.           <a href="{{ path(
  54.           app.request.attributes.get('_route'),
  55.           app.request.query.all|merge({'category_id': app.request.attributes.get('_route_params').category_id, 'pageno': pages.last})) }}">{{ '>>'|trans }}</a></li>
  56.     {% endif %}
  57.   </ul>
  58. </div>
  59.     
  60. {% endif %}