用刷新隐藏url param cakephp

时间:2014-09-22 09:25:37

标签: javascript cakephp cakephp-2.3

如何在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('&larr; Previous', array('class' => 'prev','tag' => 'li','escape' => false), '<a onclick="return false;">&larr; 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 &rarr;', array('class' => 'next','tag' => 'li','escape' => false), '<a onclick="return false;">Next &rarr;</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());
}

1 个答案:

答案 0 :(得分:0)

如果您不想使用GET请求进行分页,则可以使用AJAX分页。

或者,看看here