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