I have the following code on about 5 different pages:
<div cl开发者_如何学JAVAass="pagination">
<p class="page-numbers textcenter"><?php $this->Paginator->numbers(); ?></p>
<p class="prev-link"><?php echo $this->Paginator->prev('« Previous', null, null, array('class' => 'disabled')); ?></p>
<p class="next-link"><?php echo $this->Paginator->next('Next »', null, null, array('class' => 'disabled')); ?></p>
<p class="page textcenter"><?php echo 'Page '.$this->Paginator->counter(); ?></p>
</div>
However it behaves differently on each page. The next and previous links will appear on some pages but not others and the same for the rest of the stuff that is meant to be output.
Anyone got any ideas why this is happening?
geoffs,
i checked one of my generated views for you, and the line under concern are:
<div class="paging">
<?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class'=>'disabled'));?>
| <?php echo $this->Paginator->numbers();?>
|
<?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
</div>
A few things come into mind:
- Where you pass a null it is an empty array
- Maybe you should not disable the class option if you wrap your link in one
- A look at the responsible CSS could be worthy
Please remove the '«' and '»' symbol from syntax and try again
精彩评论