Extras

Paginator

paginator_template

Paginator template

Default:

{% block paginator_template %}

<nav {% if align %}class="{{ align }}"{% endif %}>
    <ul id="{% block paginator_id %}pagination{% endblock paginator_id %}" class="{% block paginator_class %}pagination{% if no_margin %} no-margin{% endif %}{% endblock paginator_class %}">
        {% block paginator_content %}
            {% block first %}
                {% if show_first %}
                    <li>
                        <a href="?page=1">
                            {% block first_text %}<small>First</small>{% endblock first_text %}
                        </a>
                    </li>
                {% endif %}
            {% endblock first %}

            {% block prev %}
                {% if has_prev %}
                    <li>
                        <a href="?page={{ prev_page }}">
                            {% block prev_text %}<i class="fa fa-caret-left"></i>{% endblock prev_text %}
                        </a>
                    </li>
                {% endif %}
            {% endblock prev %}

            {% block pages %}
                {% for link_page in page_numbers %}
                    {% ifequal link_page current_page %}
                        {% block current %}
                            <li class="active">
                                <a href="?page={{ link_page }}">
                                    {% block current_text %}
                                        {{ current_page }}
                                    {% endblock current_text %}
                                </a>
                            </li>
                        {% endblock current %}
                    {% else %}
                        {% block link %}
                            <li>
                                <a href="?page={{ link_page }}">
                                    {% block link_text %}
                                        {{ link_page }}
                                    {% endblock link_text %}
                                </a>
                            </li>
                        {% endblock link %}
                    {% endifequal %}
                {% endfor %}
            {% endblock pages %}

            {% block next %}
                {% if has_next %}
                    <li>
                        <a href="?page={{ next_page }}">
                            {% block next_text %}
                                <i class="fa fa-caret-right"></i>
                            {% endblock next_text %}
                        </a>
                    </li>
                {% endif %}
            {% endblock next %}

            {% block last %}
                {% if show_last %}
                    <li>
                        <a href="?page=last">
                            {% block last_text %}<small>Last</small>{% endblock last_text %}
                        </a>
                    </li>
                {% endif %}
            {% endblock last %}
        {% endblock paginator_content %}
    </ul>
</nav>

{% endblock paginator_template %}
paginator_id

Paginator element id attribute, defaults to pagination.

paginator_class

Paginator element class names.

Default:

class="{% block paginator_class %}pagination{% if no_margin %} no-margin{% endif %}{% endblock paginator_class %}"
paginator_content

Paginator main content code.

first

First page link code.

Default:

{% block first %}
    {% if show_first %}
        <li>
            <a href="?page=1">
                {% block first_text %}<small>First</small>{% endblock first_text %}
            </a>
        </li>
    {% endif %}
{% endblock first %}
first_text

First page link text.

Default:

{% block first_text %}<small>First</small>{% endblock first_text %}
prev

Previous page link code.

Default:

{% block prev %}
    {% if has_prev %}
        <li>
            <a href="?page={{ prev_page }}">
                {% block prev_text %}<i class="fa fa-caret-left"></i>{% endblock prev_text %}
            </a>
        </li>
    {% endif %}
{% endblock prev %}
prev_text

Previous page link text.

Default:

{% block prev_text %}<i class="fa fa-caret-left"></i>{% endblock prev_text %}
pages

Page number links code.

Default:

{% block pages %}
    {% for link_page in page_numbers %}
        {% ifequal link_page current_page %}
            {% block current %}
                <li class="active">
                    <a href="?page={{ link_page }}">
                        {% block current_text %}
                            {{ current_page }}
                        {% endblock current_text %}
                    </a>
                </li>
            {% endblock current %}
        {% else %}
            {% block link %}
                <li>
                    <a href="?page={{ link_page }}">
                        {% block link_text %}
                            {{ link_page }}
                        {% endblock link_text %}
                    </a>
                </li>
            {% endblock link %}
        {% endifequal %}
    {% endfor %}
{% endblock pages %}
current

Current page number link code.

Default:

{% block current %}
    <li class="active">
        <a href="?page={{ link_page }}">
            {% block current_text %}
                {{ current_page }}
            {% endblock current_text %}
        </a>
    </li>
{% endblock current %}
current_text

Current page number link text.

Default:

{% block current_text %}
    {{ current_page }}
{% endblock current_text %}
link

Adjacent page number link code.

Default:

{% block link %}
    <li>
        <a href="?page={{ link_page }}">
            {% block link_text %}
                {{ link_page }}
            {% endblock link_text %}
        </a>
    </li>
{% endblock link %}

Adjacent page number link text.

Default:

{% block link_text %}
    {{ link_page }}
{% endblock link_text %}
next

Next page link code.

Default

{% block next %}
    {% if has_next %}
        <li>
            <a href="?page={{ next_page }}">
                {% block next_text %}
                    <i class="fa fa-caret-right"></i>
                {% endblock next_text %}
            </a>
        </li>
    {% endif %}
{% endblock next %}
next_text

Next page link text.

Default:

{% block next_text %}
    <i class="fa fa-caret-right"></i>
{% endblock next_text %}
last

Last page link code.

Default:

{% block last %}
    {% if show_last %}
        <li>
            <a href="?page=last">
                {% block last_text %}<small>Last</small>{% endblock last_text %}
            </a>
        </li>
    {% endif %}
{% endblock last %}
last_text

Last page link text.

Default:

{% block last_text %}<small>Last</small>{% endblock last_text %}