Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Pagination Throwing up Errors


Reply

2 Posts   298 Views

Avatar
an_Eskimo

17 December 2013 at 4:45pm Community Member, 10 Posts

Hey guys,

I've been working with Pagniation on page results, but am now getting an error when I am trying to get to the second page of the Pagination.

Basically what I am getting is "There seems to have been a technical problem. Please click the back button, refresh your browser, and try again." when I am trying to get to the second page. This has become slightly problematic as I know there are 27 results...

<%--This creates a paginated list to be displayed below the first 10 results--%>
<ul class="pagination">
<% if $Pages.MoreThanOnePage %>
<% if $Pages.NotFirstPage %>
<li><a class="prev" href="$Pages.PrevLink">Prev</a></li>
<% end_if %>
<% loop $Pages.Pages %>
<% if $CurrentBool %>
<li class="active"><a href="#">$PageNum <span class="sr-only">(current)</span></a></li>
<% else %>
<% if $Link %>
<li><a href="$Link">$PageNum</a></li>
<% else %>
...
<% end_if %>
<% end_if %>
<% end_loop %>
<% if $Pages.NotLastPage %>
<li><a class="next" href="$Pages.NextLink">Next</a></li>
<% end_if %>
<% end_if %>
</ul>

This is the code for the pagination.

Any help would be so very much appreciated.

Avatar
an_Eskimo

17 December 2013 at 4:48pm Community Member, 10 Posts

Problem solved.... Feeling slightly, er, retarded, but it was because my form was a post not a get