cakephp paginator行为异常

cakephp paginator行为异常,cakephp,pagination,Cakephp,Pagination,我在大约5个不同的页面上有以下代码: <div class="pagination"> <p class="page-numbers textcenter"><?php $this->Paginator->numbers(); ?></p> <p class="prev-link"><?php echo $this->Paginator->prev('« Previous', null, null, arr

我在大约5个不同的页面上有以下代码:

<div class="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>

但是,它在每个页面上的行为不同。下一个和上一个链接将出现在某些页面上,但其他页面上不会出现,其他要输出的内容也会出现相同的链接

有人知道为什么会这样吗?

geoffs

我为您检查了一个生成的视图,关注的行是:

    <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>

|  
|
我想到了几件事:

  • 如果传递空值,则为空 排列
  • 如果将链接封装在一个类中,可能不应该禁用类选项
  • 看看负责任的CSS可能是值得的

  • 请从语法中删除“«”和“»”符号,然后重试