I am using Cygnite PHP Framework and generated CRUD application using Cygnite CRUD generator. I changed pagination limit to 10 per page in my model class.
Now the problem is,
In the first page serial number is displaying 1-10 but when I am clicking on the next page, though records are different it is reseting the serial number back to 1-10 again. It should be (Second page) 11-20.
My view page:
<?php
if (count($this->records) > 0) {
$i = 1;
$rowType = null;
foreach ($this->records as $key => $value) {
$rowType = ($i % 2 == 0) ? 'even' : 'odd';
?>
<tr class='<?php echo $rowType; ?>'>
<td> <?php echo $i; ?></td>
..............
</tr>
}
}
?>
<div ><?php echo $this->links; ?> </div>
How to fix it ?
Thanks!