LoginSignup
1
0

More than 5 years have passed since last update.

cakephp2 Paginatorメモ

Posted at

cakephp

Paginatorメモ

「前のページへ」のPaginatorがいらない時は以下のコードで囲んであげる。

if($this->Paginator->hasPrev()){
}

「後ろのページへ」のPaginatorがいらない時は以下のコードで囲んであげる。

if($this->Paginator->hasNext()){
}

以下例

if($this->Paginator->hasPrev()){
echo $this->Paginator->prev(__('prev'),array('tag'=>'li','disabledTag' => 'a'), null);
}
echo $this->Paginator->numbers(array('first' => 1, 'last' => 1, 'ellipsis' => ' ... ,'tag'=>'li','currentTag'=>'span','currentClass' => 'current','separator' => ''));
if($this->Paginator->hasNext()){
echo $this->Paginator->next(__('next'), array('tag' =>'li','disabledTag' => 'a'), null);
}

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0