{%- with pagination %}
{%- if numpages > 1 %}
<ul class="pagination">
    {%- if activepageno == 1 %}
    <li class="disabled"><a title="Previous">&larr;</a></li>
    {%- else %}
    <li><a href="?${qsupdate:page=activepageno - 1}" title="Previous page">&larr;</a></li>
    {%- endif %}
    {%- for pageno in pagelinks %}
    <li{% if pageno==activepageno %} class="active"{% endif %}{% if not pageno%} class="disabled"{% endif %}>
        {%- if not pageno -%}
        <a>&hellip;</a>
        {%- else -%}
        <a href="?${qsupdate:page=pageno}">${pageno}</a>
        {%- endif -%}
    </li>
    {%- endfor %}
    {%- if activepageno == numpages %}
    <li class="disabled" title="Next"><a>&rarr;</a></li>
    {%- else %}
    <li><a href="?${qsupdate:page=activepageno + 1}" title="Next page">&rarr;</a></li>
    {%- endif %}
</ul>
{%- endif %}
{%- endwith %}