title: Cakephp two separate paginations of the same model
body: <p>I have no idea how to handle these two separate paginations in the same view. Thanks for helping.</p>
  
  <p>Controller code:</p>
  
  <pre><code>[...]
  $this-&gt;Post-&gt;bindModel(array(
  'hasAndBelongsToMany'=&gt;array('Tag'),
  'belongsTo'=&gt;array('User')),false);
  if($this-&gt;Session-&gt;check('Auth.User.id'))
    $this-&gt;Post-&gt;bindModel(array(
    'hasMany'=&gt;array(
      'UserVote'=&gt;array('conditions'=&gt;array('UserVote.user_id'=&gt;$this-&gt;Session-&gt;read('Auth.User.id') )),
      'Favorite'=&gt;array('conditions'=&gt;array('Favorite.user_id'=&gt;$this-&gt;Session-&gt;read('Auth.User.id') ))
    )), false);
  
  
  $posts = $this-&gt;paginate($this-&gt;Post,array('Post.public'=&gt;1,'Post.user_id'=&gt;$uid));
  
  $posts2 = $this-&gt;paginate($this-&gt;Post,array('Post.public'=&gt;0,'Post.user_id'=&gt;$uid));
  
  
  $this-&gt;set('posts',$posts);
  $this-&gt;set('posts2',$posts2);
  
  [...]
  </code></pre>