I don't know why they don't include them by default but here is an example of how to add first and last links to your view.
<?php echo $this->Paginator->first('<< first'); #add this echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '')); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); echo $this->Paginator->last('last >>'); # add this ?>
You probably want to look at the css classes that you should apply too.
Of course there are alot more options as with most things you can read the documentation to find out more: http://book.cakephp.org/2.0/en/core-libraries/helpers/paginator.html
Another option is to use the 'first' and 'last' options to the numbers method
<?php echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled')); echo $this->Paginator->numbers(array('separator' => '', 'last' => "last", 'first' => "first")); echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled')); ?>
0 Comments