$this and user module?

I have a sidebar widget (CListView inside CPortlet). There are links in the listView created with:

 echo CHtml::link(CHtml::encode($data->title), array($where, 'id'=>$data->item_id), array('align'=>'left')); 

When I am on a page that is part of the User module, these links have have /user appended to the front of the link address. It throws an error, duh!

Once I am out of the user pages, everything works fine.

This is how I am invoking the widget in the triplets layout:


            	$this->beginWidget('zii.widgets.CPortlet', array(




				$criteria=new CDbCriteria;

				$criteria->condition = "status=:status";

				$criteria->params = array(':status' => 'Active');

				$criteria->order = 'weight ASC, insert_datetime DESC';


				$dataProvider=new CActiveDataProvider('Featured', array(







				$summaryText=Yii::t('zii','{start}-{end} of {count}');


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



					'itemView'=>'//featured/_sidebarview',  // partial view














I assume the problem is an incorrect usage of $this in the invocation, but I don’t really know and I don’t know what to do about it.

Can someone guide me please?



How do you define the variable $where?


It would help if you included here the error message.

If you want to keep the links good regardless of where you are, use a double slash in front of ‘user’ -> ‘//user’.

If I remember it correctly.

Or try with a single slash if two doesn’t work. ;)