Record Count

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
sangnandar
User
Posts: 980

Record Count

Post by sangnandar »

Advanced Settings: Enable "Auto hide paging section if single page".

I currently noticed that in previous template the table footer draws nothing (but ListOptions).
In current template (2018.0.4) it gives Record Count, which is nice, but the text "Record 1 to 4 of 4" is kinda misappropriate.
Since it's single page, the proper text should be just "4 records".


mobhar
User
Posts: 11703

Post by mobhar »

Displaying "Record 1 to 4 of 4" style in pager section is still appropriate for consistency reason to display information, whether the page is only one or more than one. So, let it be as it should be.

However, if you want to obviously change display such "4 records" case for all the generated pages, then you may simply put the following code in "Startup Script" under "Client Scripts" -> "Global" -> "Pages with header/footer":

<?php if (CurrentPage()->Pager->PageCount == 1) { ?>
$(document).ready(function() {
$('.ewRec > span').html('<?php echo CurrentPage()->Pager->RecordCount; ?> record(s)');
});
<?php } ?>


Post Reply