i want to paginate with two models association how to do this ..?
this is the find statment that i want to paginate it
$gallery =$this->Section->Gallery->find('all',array('conditions' => array('Gallery.section_id'=>86)));
// what i put here
var $paginate = array(
'Section'=>array(
'limit' => 3,
'page' => 1,
'conditions' => array('Gallery.section_id'=>86)
)
);
// what i put here also
$this->set('section', $this->paginate());
From what I gather Section hasMany Gallery.
If you want to paginate by the number of galleries you would need this
I hope his helps!