frocco wrote: > I want to display two tables on the same page. > They must both have pagination. > > How can I do this with CakePHP?
Here's how I did it (with the current CakePHP 1.1.8.3544 and the latest pagination component & helper scripts and whatnot from the Bakery). My AppController class has an array called "pagers". I hacked the pagination component to assign a unique pager id to the pagers class array which is sent to the view via beforeRender(). Granted I have an entire extension to CakePHP that is pretty much a meta-framework in its own right and knows when to create pagers (e.g., when the result set count is over ten items or whatever) and creates them automatically when a findAll or its cousins are called. But that's the general gist and I've found it works quite well. You will of course have to modify the pager helper as well as any related elements and so on to make this work properly but if you do it right multiple-pagers becomes a snap. Cheers, Matt -- BASIC: A programming language. Related to certain social diseases in that those who have it will not admit it in polite company. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
