Paginated Posts Index

setPaging($paging); // Initialize the pagination variables $th = array ( $pagination->sortBy('id'), $pagination->sortBy('title'), $pagination->sortBy('created') ); // Generate the pagination sort links echo $html->tableHeaders($th); // Create the table headers with sort links if desired foreach ($data as $output) { $tr = array ( $output['Post']['id'], $html->link($output['Post']['title'], "/Posts/View/{$output['Post']['id']}"), $output['Post']['created'] ); echo $html->tableCells($tr,array('class'=>'altRow'),array('class'=>'evenRow')); } ?>
renderElement('pagination'); // Render the pagination element ?>