Tuesday, June 26, 2012

Re: One model, multiple pagination in a single view with conditions?

I don't think it's possible with cake.

Le mardi 26 juin 2012 05:41:16 UTC+2, 42startups a écrit :
As the title suggests, is there a simple way to do this?

Or should I create a separate model?

Here's the code:

$this->paginate = array('limit'=>30);
$this->Hashtag->Pin->bindModel(array('hasOne' => array('HashtagsPin')), false);
$this->set('hashtag', $this->paginate('Pin', array('HashtagsPin.hashtag_id' => $id)));
$this->set('thought', $this->paginate('Pin', array('HashtagsPin.hashtag_id' => $id,'Pin.url'=>null)));

So I need to paginate 'hashtag' and 'thought' separately. I'll be attaching infinite scroll jquery to both.

Any ideas?

Cheers

--
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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate