我在大约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>然而,它在每个页面上的行为是不同的。下一个和前一个链接将出现在一些页面上,但不会出现在其他页面上,对于要输出的其余内容也是如此。
有人知道为什么会发生这种事吗?
发布于 2011-03-05 06:03:12
杰夫
我为您检查了我生成的一个视图,关注的行是:
<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>有几件事会出现在脑海中:
如果您将链接包装在一个
发布于 2013-01-22 17:55:24
请从语法中删除'«‘和'»’符号,然后重试
https://stackoverflow.com/questions/5199392
复制相似问题