You should test hasPrev() and hasNext() for it to work properly
regardless of the current page number.
On Fri, Apr 27, 2012 at 8:32 AM, JonStark <jeanfau@gmail.com> wrote:
> The last solution is the easiest,
>
> for those interested, this works really well :
>
> <?php
> if ($this->Paginator->hasPage(2)) {
> echo ("<hr>");
> echo $this->Paginator->prev();
> echo (" | ");
> } ?>
> <?php echo $this->Paginator->numbers(); ?>
> <?php
> if ($this->Paginator->hasPage(2)) {
> echo (" | ");
> echo $this->Paginator->next();
> } ?>
>
>
> Le jeudi 26 avril 2012 18:17:49 UTC+2, JonStark a écrit :
>>
>> How can I hide the "<< Previous Next >>" that appears if there is no pages
>> to paginate ?
>> I think this is possible because the numbers do not appear when not
>> needed.
>>
>> Thanks a lot !
>
> --
> Our newest site for the community: CakePHP Video Tutorials
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group at
> http://groups.google.com/group/cake-php
--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
Friday, April 27, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment