mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
e111dcf736
I have a client who has 2000 entries on their blog without PaginationSummary this looks madness.
26 lines
578 B
Scheme
26 lines
578 B
Scheme
<%-- NOTE: Before including this, you will need to wrap the include in a with block --%>
|
|
|
|
<% if $MoreThanOnePage %>
|
|
<p class="pagination">
|
|
<% if $NotFirstPage %>
|
|
<a class="prev" href="{$PrevLink}">←</a>
|
|
<% end_if %>
|
|
|
|
<% loop PaginationSummary(4) %>
|
|
<% if $CurrentBool %>
|
|
<span>$PageNum</span>
|
|
<% else %>
|
|
<% if $Link %>
|
|
<a href="$Link">$PageNum</a>
|
|
<% else %>
|
|
<span>...</span>
|
|
<% end_if %>
|
|
<% end_if %>
|
|
<% end_loop %>
|
|
|
|
<% if $NotLastPage %>
|
|
<a class="next" href="{$NextLink}">→</a>
|
|
<% end_if %>
|
|
</p>
|
|
<% end_if %>
|