2012-01-25 29 views

回答

2

这是我在CakePHP 1.3项目中使用的一些代码。我相信它应该仍然在CakePHP 2.0上工作(把它放在你的过滤器窗体的视图中):

// Make sure we pass any set filters to the Paginator helper 
$urlParams = $this->params['url']; 
unset($urlParams['url']); 

$this->Paginator->options(array('url' => array('?' => http_build_query($urlParams)))); 
+0

如何将paginator排序函数应用到相同的页面? – binoy

+1

@binoy排序函数不应受此代码影响,它只是将所选过滤器添加到Paginator URL中。 – Oldskool

+0

谢谢..我给了页面底部的代码,所以它不适用于排序功能。我搬到顶端,工作.. – binoy