I have never used custom pagers and stuff but the yii documentation should provide you with hints on what to do. The pagination attribute in CActiveDataProvider uses a CPagination instance, not a CLinkPager instance. That’s why you are getting undefined errors because Yii is looking for stuff related to that CPagination class.
A CLinkPager class can be passed to the widgets themselves like CGridView and CListView. Try this with your clistview:
Ok, finally I found the solution. If anyone needs to use CListView with customized labels in the CLinkPager, and the different number of items per page, you should do it this way:
[size="4"]Desired model class[/size]
In your model class method which returns CActiveDataProvider specify the pageSize attribute (do not specify pageSize attribute in the CLinkPager in the view).
return new CActiveDataProvider($this, array(
'criteria'=>$criteria,
'pagination'=>array(
'pageSize'=> 7//Or you can evaluate expression
),
));
[size="4"]View file[/size]
This way, you just specified the size of the page, but you didn’t specify pager class. You should do that in the view file: