{% if pageCount > 1 %}
{% set classAlign = (align is defined) ? " text-#{align}" : '' %}
{% if previous is defined %}
{{ 'label_previous'|trans({}, 'KnpPaginatorBundle') }}
{% else %}
{{ 'label_previous'|trans({}, 'KnpPaginatorBundle') }}
{% endif %} {% if startPage > 1 %}
1
{% if startPage == 3 %}
2
{% elseif startPage != 2 %}
{% endif %} {% endif %} {% for page in pagesInRange %} {% if page != current %}
{{ page }}
{% else %}
{{ page }}
{% endif %} {% endfor %} {% if pageCount > endPage %} {% if pageCount > (endPage + 1) %} {% if pageCount > (endPage + 2) %}
{% else %}
{{ pageCount -1 }}
{% endif %} {% endif %}
{{ pageCount }}
{% endif %} {% if next is defined %}
{{ 'label_next'|trans({}, 'KnpPaginatorBundle') }}
{% else %}
{{ 'label_next'|trans({}, 'KnpPaginatorBundle') }}
{% endif %}
{% endif %}