templates/pagination/pagination_template.html.twig line 1

  1. {# default Sliding pagination control implementation #}
    {% if pageCount > 1 %}
        <ul class="pagination">
            {#
                {% if first is defined and current != first %}
                    <li class="first pagination__item">
                        <a href="{{ path(route, query|merge({(pageParameterName): first})) }}">&lt;&lt;</a>
                    </li>
                {% endif %}
            #}
    
            {% if previous is defined %}
                <li class="previous pagination__item">
                    <a href="{{ path(route, query|merge({(pageParameterName): previous})) }}" class="pagination__link pagination__link--arrow">
                        <svg width="11" height="18" viewBox="0 0 11 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M10 1L2 9L10 17" stroke="#000" stroke-width="2"></path>
                        </svg>
                    </a>
                </li>
            {% else %}
                <li class="previous pagination__item">
                    <a class="pagination__link pagination__link--arrow disabled" disabled>
                        <svg width="11" height="18" viewBox="0 0 11 18" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M10 1L2 9L10 17" stroke="#000" stroke-width="2"></path>
                        </svg>
                    </a>
                </li>
            {% endif %}
    
            {% for page in pagesInRange %}
                {% if page != current %}
                    <li class="page pagination__item">
                        <a href="{{ path(route, query|merge({(pageParameterName): page})) }}" class="pagination__link">{{ page }}</a>
                    </li>
                {% else %}
                    <li class="current pagination__item"><a class="pagination__link is-active">{{ page }}</a></li>
                {% endif %}
            {% endfor %}
    
            {% if next is defined %}
                <li class="next pagination__item">
                    <a href="{{ path(route, query|merge({(pageParameterName): next})) }}" class="pagination__link pagination__link--arrow">
                        <svg width="10" height="16" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M1 1L8 8L1 15" stroke="black" stroke-width="2"></path>
                        </svg>
                    </a>
                </li>
            {% else %}
                <li class="next pagination__item">
                    <a class="pagination__link pagination__link--arrow disabled" disabled>
                        <svg width="10" height="16" viewBox="0 0 10 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                            <path d="M1 1L8 8L1 15" stroke="black" stroke-width="2"></path>
                        </svg>
                    </a>
                </li>
            {% endif %}
            {#
                {% if last is defined and current != last %}
                    <li class="last pagination__item">
                        <a href="{{ path(route, query|merge({(pageParameterName): last})) }}">&gt;&gt;</a>
                    </li>
                {% endif %}
            #}
        </ul>
    {% endif %}