2nd pagination not in phase with real status
I have page/view that calls twice $this->pagination->create_links();
<?php echo $this->pagination->create_links();?>
<?php echo $this->pagination->create_links();?>
However, only the first call really reflects the new state: if I went to page 2, it shows that I'm on page 2. While the 2nd call reflects that I'm still on page 1 (and it never gets updated).
Am I missing something?
HTML output:
<ul>
<li><a href="http://localhost/index.php/phonebook/index/" data-ci-pagination-page="1" rel="prev"><</a></li>
<li><a href="http://localhost/index.php/phonebook/index/" data-ci-pagination-page="1" rel="start">1</a></li>
<li><span id="current">2</span></li>
</ul>
<ul>
<li><span id="current">1</span></li>
<li><a href="http://localhost/index.php/phonebook/index/20" data-ci-pagination-page="2">2</a></li>
<li><a href="http://localhost/index.php/phonebook/index/20" data-ci-pagination-page="2" rel="next">></a></li>
</ul>
Current workaround: call it once, store the result in a variable that can be reused at will.
I don't know ... It looks like it could be a bug, but even if we knew all of the options that you've used, it would still be very hard to debug this. I'm afraid you'd have to pinpoint it yourself if you want it fixed.
Thanks. I may stay with my workaround: call it once, store the result in a variable that can be reused at will.