Hi all
Just want to clarify the following…
According to the CBasePager documentation, in order to set the page size of a CListView/ CGridView, you need to specify the pageSize property in the pager property of the CListView.
$this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_post',
'sortableAttributes'=>array(
'title',
),
'enablePagination'=>true,
'pager' => array(
'class'=>'CLinkPager',
'pageSize'=>2,
)
));
However, this doesn’t seem to work. It seems that you need to set the page size inside the data provider instead of in the CListView.
$dataProvider->pagination->pageSize = 5;
I assumed the documentation is wrong or am I missing something?