Friday, April 27, 2012

Re: Hide "previous" "next" when no pagination

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

No comments: