如何在cakephp中隐藏/取消隐藏/屏蔽URL查询参数? 我尝试使用javascript但是当我尝试以下页面时仍然出错。
视图和控制器
pastebin.com/8XEBzQSU
pastebin.com/pEjcU5ma
http://www.mywebsite.com/web/index/page:2?url=web
hide
index/page:2?url=web
视图
</p>
<?php
$params = $this->Paginator->params();
if ($params['pageCount'] > 1) {
?>
<div>
<ul class="pagination pagination-sm">
<?php
echo $this->Paginator->prev('← Previous', array('class' => 'prev','tag' => 'li','escape' => false), '<a onclick="return false;">← Previous</a>', array('class' => 'prev disabled','tag' => 'li','escape' => false));
echo $this->Paginator->numbers(array('separator' => '','tag' => 'li','currentClass' => 'active','currentTag' => 'a'));
echo $this->Paginator->next('Next →', array('class' => 'next','tag' => 'li','escape' => false), '<a onclick="return false;">Next →</a>', array('class' => 'next disabled','tag' => 'li','escape' => false));
?>
</ul>
</div>
控制器
if (isset($tmp) && $tmp){
array_push($paginate['conditions'], $tmp);
}
//print_r($paginate);
$this->paginate = $paginate;
}
$this->set('web', $this->Paginator->paginate());
}