Skip to content

Commit

Permalink
PhotoGalleryHolder.ss: Updated to Bootstrap pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
purplespider authored Jul 11, 2023
1 parent 87e6524 commit b8108da
Showing 1 changed file with 36 additions and 22 deletions.
58 changes: 36 additions & 22 deletions templates/PurpleSpider/BasicGalleries/Layout/PhotoGalleryHolder.ss
Original file line number Diff line number Diff line change
Expand Up @@ -40,31 +40,45 @@ $Content
<% end_if %>
<% end_loop %>

<% if Galleries.MoreThanOnePage %>
<div class="pagination">
<% if Galleries.NotFirstPage %>
<a class="prev" href="$Galleries.PrevLink">Prev</a>
<% end_if %>
<% loop Galleries.Pages %>
<% if CurrentBool %>
$PageNum
<% else %>
<% if Link %>
<a href="$Link">$PageNum</a>
<% else %>
...
<% end_if %>
<% end_if %>
<% end_loop %>
<% if Galleries.NotLastPage %>
<a class="next" href="$Galleries.NextLink">Next</a>
<% end_if %>
</div>
<% end_if %>
<% if PaginatedGalleries.MoreThanOnePage %>
<% with $PaginatedGalleries %>
<nav aria-label="Page navigation example">
<ul class="pagination">
<% if $NotFirstPage %>
<li class="page-item">
<a class="page-link prev" href="{$PrevLink}" aria-label="Previous page">
<span aria-hidden="true">Previous</span>
</a>
</li>
<% end_if %>

<% loop $PaginationSummary(4) %>
<% if $CurrentBool %>
<li class="page-item active" aria-current="page"><a class="page-link" href="#">$PageNum</a></li>
<% else %>
<% if $Link %>
<li class="page-item"><a class="page-link" href="$Link">$PageNum</a></li>
<% else %>
<li class="page-item disabled">...</li>
<% end_if %>
<% end_if %>
<% end_loop %>

<% if $NotLastPage %>
<li class="page-item">
<a class="page-link prev" href="{$NextLink}" aria-label="Next page">
<span aria-hidden="true">Next</span>
</a>
</li>
<% end_if %>
</ul>
</nav>
<% end_with %>
<% end_if %>

<% else %>
<p><strong>Sorry, we don't have any photo galleries yet. </strong>Please check back later.</p>
<% end_if %>

$Form
$PageComments
$PageComments

0 comments on commit b8108da

Please sign in to comment.