The part object is an object specific to pagination. The paginate object contains an array of parts that can be translated into a page numbering navigation to allow the user to select a page to jump to for the paginated collection.

Properties

hellip_break  - Boolean - If the part is intended to be used as a ellipsis break, this will return true .
title - String - The title of the part. In the case of a page number, this will be the page number (e.g. 1 ). In the case of a hellip_break part, this will be ….
is_link - Boolean - Indicates whether the part is a url (e.g. to a different page in the collection.
url - String - The url to which the part will navigate to.

Example implementation

<ul>
  {% for part in paginate.parts %}
    {% if part.hellip_break %}
      <li class="page-numbers"><span>{{ part.title }}</span></li>
    {% elsif part.is_link == false %}
      <li class="page-numbers">
        <span class="current">{{ part.title }}</span>
      </li>
    {% else %}
      <li class="page-numbers">
        <a href="{{ part.url }}">{{ part.title }}</a>
      </li>
    {% endif %}
  {% endfor %}
</ul>
Did this answer your question?