Last active
November 22, 2024 18:37
-
-
Save kellyvaughn/0b8e7292b48d365e2697 to your computer and use it in GitHub Desktop.
Shopify Pagination ("Displaying X - Y of Z items (Page X of Y) / View All")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% assign updated_count = paginate.current_offset | plus: paginate.page_size %} | |
<span class="nomobile">Displaying </span> | |
<span> | |
{{ paginate.current_offset | plus: 1 }} | |
{% if paginate.items < paginate.page_size %} | |
- {{ paginate.items }} of {{ paginate.items }} | |
{% else %} | |
- | |
{% if paginate.items > updated_count %} | |
{{ updated_count }} | |
{% else %} | |
{{ paginate.items }} | |
{% endif %} | |
of {{ paginate.items}} | |
{% endif %} | |
Products | |
<span class="nomobile"> | |
(Page {{ paginate.current_page }} of {{ paginate.pages }}) | |
</span> / </span><a href="?view=all">View All</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment