cakephp paginator行为异常
我在大约5个不同的页面上有以下代码: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
<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>
|
|
我想到了几件事:
请从语法中删除“«”和“»”符号,然后重试