Skip to content

Use of pagination in product listings #14

@andelo

Description

@andelo

when listing many products, pages, articles etc its common to use pagination to limit the result into pages.

{% paginate collection.products by 25 %}
  {% for product in collection.products %}
    {% include 'productCard' %}
  {% endfor %}
  /* render the pagination buttons */  
  {% for p in (1..paginate.pages) %}
    ...
  {% endfor %}
{% endpaginate %}

The pagination uses a page url query parameter like this: /collection/our-versions?page=1

It can be used with auto pagination or infinite scroll where the paginated content is fetched using js.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions