You should be able to do something like this (after setting up the paginator):
$item = end($paginator->getItemsByPage(count($paginator)));
Untested, but that should at least put you on the right track.
Hope that helps,
-Matt
On Mon, Dec 29, 2008 at 4:01 AM, Emanuele Deserti <emanuele.deserti@netwing.it> wrote:
Hi to all,
how I can identify the last item in my paginator?
NOT the last in the current page, but the last item in the last page.
For example: I have 100 items paginated into 5 pages (20 items per page); I need to display custom content only for the 100th (the last of all).
I've tried with getTotalItemCount(), getCurrentItemCount() and so on but without success...
Also googled around and look into API core doc but nothing useful found...
Thanks in advance
---
Emanuele Deserti
Netwing S.r.l.
<emanuele.deserti@netwing.it>
Tel. 0532-1915183
http://www.netwing.it
没有评论:
发表评论