I needed to do this too, but the current paginator helper doesn't
support it. But the work has been done for you. If you copy /cake/libs/
view/helpers/paginator.php to /app/views/helpers/paginator.php and
apply the patch from this ticket: https://trac.cakephp.org/ticket/2202
, then you can use the new pageNumbers function like so:
<?php echo $paginator->pageNumbers(array('maxPages'=>5), ' ');?>
Take a look at the pageNumbers function's comments. It works pretty
much like you would expect.
- Frank
On Apr 3, 9:31 am, "MrTufty" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've been developing a few sites in Cake for internal use, to
> demonstrate its power to my bosses.
>
> I'm using 1.2, and the Pagination helper quite a lot (for some reason
> they want all the content to fit on an 800x600 screen, so I have a LOT
> of multiple page sections).
>
> Currently, the helper renders my pagination links like this:
>
> << Previous | Page 1 of 5 | Next >>
>
> Which I thought was fine, it works well enough. But what they're
> asking for is something more like this:
>
> << Previous | 1 2 3 4 5 | Next >>
>
> Is it possible to do it this way with the pagination code as is, or do
> I have to look for an alternate way to get it working the way they
> want?
>
> Thanks in advance for any help :)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---