I thought this would be quite simple but it's proving to be a bit of a challenge. I'm using getResource with getPage for pagination, this is all working fine. The problem is I want to display information showing the total number of records and the number displayed on a particular page. Sort of like this:
<p>showing [[+limit]] of [[+total]]</p>
The problem arises when there are fewer records than the limit or on the last page where the remaining records are also likely to be less than the limit.
I've looked at passing [[+pageCount]] and [[+total]] into a snippet where I can do the calculations but I can't get this to work. The calculations come out incorrect. I think this is something to do with the passed values being strings and not integers but I'm not sure.
Hi, thanks for the reply. It's been a while since I looked at this.
I'm trying to use output modifiers to determine when a user is on the last pagination page.
For example: I have 2 pages in total, when I'm on the last page the following is output fine:
[[+pageCount]] output = 2
[[+page]] output = 2
But if I try and compare these values nothing is output, eg: