検索条件の引き継ぎでハマったのでメモ。
1. Searchプラグインの導入
public $components = array('Search.Prg');
2. 検索処理の作成
public function search() { $this->Prg->commonProcess(); $this->Paginator->settings['conditions'] = $this->Post->parseCriteria($this->Prg->parsedParams()); $this->set('posts', $this->Paginator->paginate()); }
$this->Prg->commonProcess()を記述すると、検索条件の引き継ぎが反映されて、2ページ目以降も$this->request->dataにPOSTしたデータが格納される(記述がない場合は空になる)