thanks that's work and I use it as final solution.
However it will be interesting if it's possible identify the last item
directly in the view script, inside the foreach against the paginator
himself :)
There's a way to do it? Or it's useless as we can use your code?
Il giorno 29/dic/08, alle ore 19:07, Matthew Ratzloff ha scritto:
> Hi Emanuele,
>
> 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
>
---
Emanuele Deserti
Netwing S.r.l.
<emanuele.deserti@netwing.it>
Tel. 0532-1915183
http://www.netwing.it
没有评论:
发表评论