Adding Parameters To Current Url In Listview

Hi All,

I’ve seen already similar topic on the forum but my problem is a bit different. I’d like to add additional $_GET parameter to current url. After search in CListView I have this url:


http://localhost/bk/frontend/www/book/search/?q=mysql&yt0=

I have used array_merge($_GET, $params) and what I got is:


http://localhost/bk/frontend/www/book/search/?0%5Bq%5D=mysql&0%5Byt0%5D=&0%5Bcid%5D=1

except:


http://localhost/bk/frontend/www/book/search/?q=mysql&yt0=&cid=1

Somehow this 0%5B, %5D have been added to my url, mixing things up. Does anyone know how to get rid of them.

this is the code for adding parameter to url




	public static function getChilds($id) {

		$data = array();


		foreach(Category::model()->findAll('parent_id = ' . $id) as $model) {

			$params = array_merge($_GET, array('cid'=>$model->id));

			$childs = count(Category::getChilds($model->id));

			$row['text'] = CHtml::link($model->title, array('//book/search', $params));

			$row['children'] = Category::getChilds($model->id);

			$data[] = $row;

		}

		return $data;

	}



Thanks in advance

Ok I found the solution: it was enough to use createUrl :)