Welcome Guest, Not a member yet? Register   Sign In
Pagination - show number results on current page
#11

(02-07-2022, 01:43 AM)sjender Wrote: It looks like I am not explaining my issue very well Smile.

I will explain it in more detail (because the example InsiteFX has provided, shows the number of pages, that's not what I mean).

Imagine making an overview of al registered users of the site.
In this example there are 55 users.

I will use the paginator service and I set the number of results per page on 20....

So, the first page wil have 20 users on it.
The second also 20
But the third only 15.

In the topbar of the table I want to show this number (users on this specific page).

So.......

Page 1 should have "Users: showing 20 of 55"
Page 2 should have "Users: showing  20 of 55"
Page 3 should have "Users: showing  15 of 55"

The total amount (55) is not a problem, that is $pager->getTotal().
But the first one (20, 20, 15) is the one I'm looking for..

I hope I have made my issue somewhat more understandable like this?

What are you using to render the current results on the page? The 15 or 20 rows? You could just count that.
Reply
#12

Yes, I could simply use a count(), and I will.
But I was hoping there was a builtin method.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB