<?php class AlbumsController extends AppController { var $name = 'Albums'; function view($id = null) { $this->Album->id = $id; $this->set('tracks', $this->Album->read()); } } ?>
I am wondering how I would apply pagination to a presentation function. I did it for things like:
var $paginate = array( 'limit' => 8, 'order' => array( 'Album.catalog_no' => 'ASC' ) ); function index() { $this->Album->recursive = 0; $this->set('albums', $this->paginate()); }
But applying it to the above view function, I lose a little. Thanks!
Antigony
source share