Yii Search Destroy All The Old Get Value In The Address Bar. Help Please

Dear all,

I have a webpage with the following address:


When I implement search in my page, my url will be changed to


You can see that all my old GET value disappears.

How can I get my old GET value back so I still get


Attached are some codes for the search

   $user=new Users('search');




As model is User and the attributes will be based on model so you should have them as

// URL


By this

your search code



will assign the values to user model properties i.e. aid and bid


Hi, I don’t really understand your code. My GET var are not USERS attributes. How can I get them then?

Thank you!

Hi, this didn’t really solve my problem. aid and bid are not variables from USERS. They are simply some GET variables I need.

Are there any way to append some thing like


after the whole search link?


Can you please share your code

Yes, if you can use params property of CPagination to do this, check


Hi, I check the link…Should I use pageVar or something like that…?

Here are my codes for the Dataprovider:

$dataProvider->pagination->pageSize = 30;

$dataProvider->sort->defaultOrder='active DESC';



$this->widget('zii.widgets.CListView', array(




             'template'=>'{items}<div class="clear"></div><div style="margin-right:10px;">{pager}</div>',




      //  'create_time'=>'Time',



I just need to append aid & bid GET values in this page…

in the data provider, you can use CPagination…

$dataProvider->pagination->params= array(




(Code not tested)

Sorry but this code only add parameters when I change page…It doesn’t add params for the search url…

Send me url page full code in pm

Thank you but I just finished this by a dirty way

add something like

<input style="display:none; margin-left:20px;" name="aid" id="search_aid" type="text" maxlength="30" value="<?php echo $aid;?>">

<input style="display:none; margin-left:20px;" name="bid" id="search_bid" type="text" maxlength="30" value="<?php echo $bid;?>">