With the method mentioned above, where you can set up pagination for 
related models, how do you display the different pagaintion areas in the 
view?

I recently tried to do this but couldn't work out how to display the page 
number or sort table headers multiple times in a view

On Thursday, June 7, 2012 6:32:13 PM UTC+2, anlam wrote:
>
> Hi,
>
> I have implemented two different pagination mechanism to a single view. 
> They use different models, both use Ajax and custom controller action. 
> However I had to do this in order to implement different options for both.
>
> $userPaginator = clone $this->Paginator; //workaround to implement the 
> second paginator
> $channelPaginator = $this->Paginator; 
>
> $userPaginator->options(array(
>     'update' => '.who-is-online ul',
>     'evalScripts' => true,
>     'url' => array(
>         'controller' => 'users',
>         'action' => 'action'
>     ),
>     'model' => 'FileNode'
> ));
> $channelPaginator->options(array(
>     'update' => '.channels ul',
>     'evalScripts' => true,
>     'url' => array(
>         'controller' => 'channels',
>         'action' => 'action'
>     ),
>     'model' => 'ChannelNode'
> ));
>
> So, as you see in my first line, I clone the paginator object to be able 
> to provide different options for both of them.
>
> Is there any different and lighter method to do this? This works 
> correctly, but I think I am missing something.
>
> Thanks,
>
>
>

-- 
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
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to