Newer
Older
pre-www / src / blocks / pagination.twig
{% if not_first_page %}
    <nav aria-label="pagination" class="pagination"> 
        <ul>
            <li><a href="#">Prima pagina</a></li>
            <li><a href="#">1</a></li>
            <li><span>&#8230;</span></li>
            {% for i in range(14,15) %}
                <li><a href="#">{{i}}</a></li>
            {% endfor %}
            <li class="is-active"><a href="#" aria-label="pagina 16" aria-current="page">16</a></li>
            {% for i in range(17,18) %}
                <li><a href="#">{{i}}</a></li>
            {% endfor %}
            <li><span>&#8230;</span></li>
            <li><a href="#">24</a></li>
            <li><a href="#">Ultima pagina</a></li>
        </ul>
    </nav>
{% elseif last_page %}
    <nav aria-label="pagination" class="pagination"> 
        <ul>
            <li><a href="#">Prima pagina</a></li>
            <li><a href="#">1</a></li>
            <li><span>&#8230;</span></li>
            {% for i in range(20,23) %}
                <li><a href="#">{{i}}</a></li>
            {% endfor %}
            <li class="is-active"><a href="#" aria-label="pagina 24" aria-current="page">24</a></li>
            <li><span>Ultima pagina</span></li>
        </ul>
    </nav>
{% else %}
    <nav aria-label="pagination" class="pagination"> 
        <ul>
            <li><span>Prima pagina</span></li>
            <li class="is-active"><span>1</span></li>
            {% for i in range(2,5) %}
                <li><a href="#">{{i}}</a></li>
            {% endfor %}
            <li><span>&#8230;</span></li>
            <li><a href="#">24</a></li>
            <li><a href="#">Ultima pagina</a></li>
        </ul>
    </nav>
{% endif %}