2016-04-04 24 views
0

URLパラメータをページ番号に設定するにはどうすればよいですか?URLパラメータをページ番号に設定する方法

私のURLは最初のページネータ番号がパラメータを持っているデフォルトではcompany/overview/3?page=1&sort=Tenancies.stage&direction=asc

です。番号2、3、4 ...にどのようにパラメータを適用できますか?

<div class="row paginator"> 
     <div class="col-lg-12"> 
      <div class="pull-left"><?= $this->Paginator->counter() ?></div> 
      <ul class="pagination pull-right"> 
       <?= $this->Paginator->prev('< ' . __('previous')) ?> 
       <?= $this->Paginator->numbers() ?> 
       <?= $this->Paginator->next(__('next') . ' >') ?> 
      </ul> 
     </div> 
    </div> 

答えて

0

ただただたとえば、この行

<?php $this->Paginator->options(['url' => $this->request->query]) ?> 

を追加します:

<div class="row paginator"> 
     <div class="col-lg-12"> 
      <div class="pull-left"><?= $this->Paginator->counter() ?></div> 
      <ul class="pagination pull-right"> 
       <?php $this->Paginator->options(['url' => $this->request->query]) ?> 
       <?= $this->Paginator->prev('< ' . __('previous')) ?> 
       <?= $this->Paginator->numbers() ?> 
       <?= $this->Paginator->next(__('next') . ' >') ?> 
      </ul> 
     </div> 
    </div> 
ここ

は、私の見解であります
関連する問題