Forums

How can I show the number of results of my listing?

anne1979 21 Jul, 2016
Hi Bob, hi others,

another question, I couldn't figure it out by myself - perhaps it it easy to solve...

I have a connectivity listing working with filter fields and so on, which is giving me a list of database entries - working fine.
I want to show the number of hits, that are currently displayed / matching the filter criteria - how can I achieve that (the variable holding that value is already in use in the pagination stuff I think, but I cannot find out how to display the "total count" on its own, e.g. above the listing...

Thanks in advance,
Anne
GreyHead 21 Jul, 2016
Hi Anne,

Not sure how to do this, I don't remember if CC returns the total count in the listing data. I'll try to take a look.

Just for clarity, what you want is the total number of records found, not the number shown on the current listing page?

Bob
anne1979 21 Jul, 2016
Hi Bob,
thats correct - the number of records found is what I'm looking for...

Thank you for helping me,
Anne
GreyHead 21 Jul, 2016
1 Likes
Hi Anne,

I think I have found it, please try $this->view->Paginator->total for example:
<p>The total number of records found is <?php echo $this->view->Paginator->total; ?></p>

Bob
anne1979 21 Jul, 2016
Hi Bob,

thank you! Thats it!

Have a nice day,
Anne
dariegler 11 Sep, 2016
i tried this and did not get a result. perhaps i am puitting the code in the wrong place. i put it in the footer box.
This topic is locked and no more replies can be posted.