2016-08-22 2 views
0

영어로 죄송합니다.Cakephp 2.8 페이지 링크 번호를 클릭 할 수 없습니다.

저는 cakePHP 2.8.3으로 아약스와 페이지 매김을 사용하려고합니다.

첫 번째로드가 올바르게 작동합니다. 나는 매기기 번호를 참조하십시오 Paginator numbers is load

내가 페이지 번호 "2"또는 "다음 >>"내용 # 내용 공들인가 새로 고침하지만 링크 페이지 번호 1 (와 클릭

링크 "< < 이전")을 사용할 수 없습니다. 페이지 번호 "2"... 컨트롤러

다음

내 코드 클릭 유지 : 매김을위한

공공 변수 :

public $paginate = array('Entite' => array(
     'limit' => 2, 
     'order' => array(
      'Entite.nom' => 'asc' 
     ), 
)); 

내 행동 내부 코드 :

$this->Paginator->settings = $this->paginate; 
    $this->Paginator->settings = array(
     'conditions' => $conditions, 
     //'limit' => $sql_limit 
     'limit' => 2 
    ); 
$data = $this->Paginator->paginate('Entite'); 
    $this->set('data', $data); 

내 코드보기 :

<div id="content-recherche"> 
... 
</div> 
<ul class="pagination"> 
    <?php 
    $this->Js->JqueryEngine->jQueryObject = 'jQuery'; 

    $this->Paginator->options(array(
     'update' => '#content-recherche', 
     'url' => array('controller' => 'Recherche', 'action' => 'coiffure'), 
     'complete' => '$.getScript("/js/utils.js", function (data, textStatus, jqxhr) {});', 
     'evalScripts' => true, 
    )); 
    ?> 

    <?php 
    echo $this->Paginator->numbers(array(
     'first' => '<<', 
     'currentClass ' => 'active', 
     'tag' => 'li', 
     'modulus' => 5, 
     'last' => '>>')); 
    ?> 
    <?php 
    echo $this->Paginator->prev(
      '« Previous', null, null, array('class' => 'disabled') 
    ); 
    echo $this->Paginator->next(
      'Next »', null, null, array('class' => 'disabled') 
    ); 
    ?> 

</ul> 

누군가 나의 실수는 무엇입니까?

감사합니다.

답변

3
<div id="content-recherche"> 
... 
</div> 
<ul class="pagination"> 
... 
</ul> 

당신은 <ul class="pagination"></ul> 코드를 새로 고침/업데이트되지 않습니다. <div id="content-recherche"></div> 블록의 콘텐츠를 새로 고침/업데이트 할 때 <ul class="pagination"></ul> 태그의 코드를 새로 고침/업데이트해야합니다.

+0

네 솔루션으로 더 잘 작동합니다. 당신의 도움을 주셔서 감사합니다 – gannher

관련 문제