Skip to content

Instantly share code, notes, and snippets.

@mooror
Created February 7, 2020 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mooror/ef8ab67655d5b3c843a8325f5f894563 to your computer and use it in GitHub Desktop.
Save mooror/ef8ab67655d5b3c843a8325f5f894563 to your computer and use it in GitHub Desktop.
Product Pagination SS Include
<nav class="pagination-bar pagination-bar--bottom" aria-label="Product list navigation">
<ul class="pagination-list">
<% if $ProductList.NotFirstPage %>
<li class="pagination-list__item">
<a class="pagination-list__link prev" href="$ProductList.PrevLink">
<i aria-hidden="true" class="fa fa-caret-left"></i>
</a>
</li>
<% end_if %>
<% loop $ProductList.Pages %>
<li class="<% if $CurrentBool %>current <% end_if %>pagination-list__item">
<% if $CurrentBool %>
$PageNum
<% else %>
<% if $Link %>
<a class="pagination-list__link" href="#">$PageNum</a>
<% else %>
...
<% end_if %>
<% end_if %>
</li>
<% end_loop %>
<% if $ProductList.NotLastPage %>
<li class="pagination-list__item">
<a class="pagination-list__link next" href="$ProductList.NextLink">
<i aria-hidden="true" class="fa fa-caret-right"></i>
</a>
</li>
<% end_if %>
</ul>
</nav>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment