part

Each part returned by the paginate.parts array represents a link in the pagination's navigation.

Input
{% for part in paginate.parts %}
    {% if part.is_link %}
        {{ part.title | link_to: part.url}}
    {% endif %}
{% endfor %}
Output
<a href="/collections/frontpage?page=1" title="">1</a>
<a href="/collections/frontpage?page=2" title="">2</a>
<a href="/collections/frontpage?page=3" title="">3</a>

The part object has the following attributes:


In this article

  • part.is_link
  • part.title
  • part.url

Returns true if the part is a link, returns false if it is not.

part.title

Returns the title of the part.

part.url

Returns the URL of the part.

results matching ""

    No results matching ""