Search code examples
zend-frameworkzend-paginator

How to get first and last items number with Zend Paginator?


I need to get the fisrt item and last item number in my view.phtml.

The trouble is that I can't acces this properties in my pagination control, because of the structure of the html. For example:

<div class="list">
.... rows ...
<div class="items"> 1 - 18 of 540</div>
</div>
<div id="pagination">
<?php echo $this->paginator; ?>
</div>

Is there anyway to access to those properties from the view? I just can't figure out how can I do it.


Solution

  • $this->paginator->first;
    $this->paginator->last;