I want to create pagination with if condion

release

#1

$this->paginate = array(
‘Post’ => array(
‘conditions’ => array(‘Post.topic_id’ => $topic[‘Topic’][‘id’], ‘Post.source_type’ => 0),
‘limit’ => 5,
‘contain’ => array(‘User.Profile’,‘Topic’,‘PostLike’),
));
$posts = $this->Paginator->paginate(‘Post’);

$this->paginate = array(
‘Post’ => array(
‘conditions’ => array(‘Post.topic_id’ => $topic[‘Topic’][‘id’], ‘Post.source_type’ => 1),
‘limit’ => 5,
‘contain’ => array(‘SchoolsUser.domain_name’, ‘SchoolsUser.name’, ‘SchoolsUser.picture’, ‘Topic’,‘PostLike’),
));
$postSchool = $this->Paginator->paginate(‘Post’);

I want to create this both pagination in single pagination query
Any one can help me?