Jus*_*ohn 2 cakephp cakephp-1.3
如何获取Cake php默认分页以获取第一页和最后一页的分页链接
<p>
<?php
echo $this->Paginator->counter(array(
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
));
?> </p>
<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>
Run Code Online (Sandbox Code Playgroud)
这将输出
Page 1 of 89, showing 15 records out of 1326 total, starting on record 1, ending on 15
<< previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | next >>
Run Code Online (Sandbox Code Playgroud)
如何使用默认分页获得第一页和最后一页链接
first | << previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | next >> | last
Run Code Online (Sandbox Code Playgroud)
Jav*_*der 16
我尝试了这个代码,它正在我的cakephp 1.3中工作: -
<?php echo $this->Paginator->first(__('<< First', true), array('class' => 'number-first'));?>
<?php echo $this->Paginator->numbers(array('class' => 'numbers', 'first' => false, 'last' => false));?>
<?php echo $this->Paginator->last(__('>> Last', true), array('class' => 'number-end'));?>
Run Code Online (Sandbox Code Playgroud)
试着实现这个......
这就是你要找的东西: -
<?php echo $this->Paginator->first(__('First', true), array('class' => 'disabled'));?>
| <?php echo $this->Paginator->prev('<< ' . __('Previous', true), array(), null, array('class'=>'disabled'));?>
| <?php echo $this->Paginator->numbers(array('class' => 'numbers', 'first' => false, 'last' => false));?>
| <?php echo $this->Paginator->next(__('Next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
| <?php echo $this->Paginator->last(__('Last', true), array('class' => 'disabled'));?>
Run Code Online (Sandbox Code Playgroud)

| 归档时间: |
|
| 查看次数: |
5982 次 |
| 最近记录: |