开发者

cakephp paginator behaving strangely

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:

  1. Where you pass a null it is an empty array
  2. Maybe you should not disable the class option if you wrap your link in one
  3. A look at the responsible CSS could be worthy


Please remove the '«' and '»' symbol from syntax and try again

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜