Just trying to make my pagination in CakePHP 2 better looking.
I added the first and last links but still had a radius on my previous and next links which looked odd and my 'last >>' link had a square end too. So a bit ugly really.
Following is an example of pagination links after I have turned off some of the classes on the next previous links to stop them rendering with corner radiuses, added a HTML entity of › and ‹ instead of '<' and '>' and « and » instead of '<<' and '>>'
Looks better.
<div class="paging">
<?php
echo $this->Paginator->first('« first', ['escape' => false, 'class' => 'prev']);
echo $this->Paginator->prev('‹ ' . __('previous'), array('escape' => false, 'class' => false), null, array('class' => 'prev disabled'));
echo $this->Paginator->numbers(array('separator' => ''));
echo $this->Paginator->next(__('next') . ' ›', array('escape' => false, 'class' => false), null, array('class' => 'next disabled'));
echo $this->Paginator->last('last »', ['escape' => false, 'class' => 'next']);
?>
</div>



0 Comments