The paginate object provides information on paginate navigation, it contains following attributes:


Object Fields

FieldData TypeDescription
paginate.current_pageNumberReturns the number of the current page.
paginate.current_offsetNumberReturns the number of items in previous pages. For example, if you are currently in page 5 and number of items per page is 12, current_offset will be 48 in this case.
paginate.itemsNumberReturns the number of items in total.
paginate.page_sizeNumberReturns the number of items in each page
paginate.pagesNumberReturns the number of pages available.
paginate.partsArrayReturns an array of parts for pagination rendering.
paginate.nextObjectReturns the Part object of next page
paginate.previousObjectReturns the Part object of previous page
paginate.sort_optionsArrayReturns an array of available sorting options.
Each option contains attributes value and title
paginate.limit_optionsArrayReturns an array of suggested items per page options.
Each option contains attributes value and title
paginate.selected_sort_optionStringReturns current selected sort option object's value.
e.g. created_at_asc

Code Example

{% for part in paginate.parts %}
<li class="{% if part.page == paginate.current_page %}active{% endif %}">
    <a href="{{ part.handle }}">
        {{ part.title }}
    </a>
</li>
{% endfor %}