CakePHP has some great pagination functions built in – however these are normally categorised with “sortby” and “Number per page”.
I found on another blog this code (http://foldifoldi.com/news/?p=169):
function index($filter = null) {
$this->SttwTrack->recursive = 0;
$this->set(’filter’, $filter);
// query all distinct first letters used in names
$letters = $this->SttwTrack->query(’SELECT DISTINCT [...]











