Posted By

deftonez4me on 08/24/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

umang_nine


Redeclare Paginate var in function | CakePHP


 / Published in: PHP
 

  1. //override pagination variable for custom pagination that adds distance
  2. $this->paginate = array('limit' => 10,
  3. 'fields' => array('Location.lat','Location.long'),
  4. 'order' => array('distance' => 'ASC'));
  5.  
  6. $this->set('locations', $this->paginate('Location', $conditions));

Report this snippet  

You need to login to post a comment.