pupadupa
(K Kabanov)
January 8, 2011, 12:36am
1
I’m using CListView in my blog, and got some question about customizing pagination.
Here what I got:
PostController.php:
$dataProvider=new CActiveDataProvider('Post',
array(
'criteria'=>$criteria,
'pagination'=>array(
'pageSize'=>1,
),
)
);
and this is view:
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
'enableSorting'=>true,
'template'=>"{items}\n{pager}", //this remove: Displaying #... of ... result
'cssFile'=> Yii::app()->theme->baseUrl.'/style.css',
)); ?>
How could I remove “Go to page:” near pagination area ? (I couldn’t find any solution for CListView… and there is no such property as ‘header’ for CListView/CPagination, only for CLinkPager).
Thanks!
pupadupa
(K Kabanov)
January 8, 2011, 1:22am
3
I have found it, but I get an error "Property "CListView.header" is not defined." when I change my view file like this:
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
'enableSorting'=>true,
'template'=>"{items}\n{pager}", //this remove: Displaying #... of ... result
'cssFile'=> Yii::app()->theme->baseUrl.'/style.css',
'header'=>'HEADER',
)); ?>
Could you please tell me where have I got a mistake in my view file ?
<?php $this->widget('zii.widgets.CListView', array(
'pager' => array(
'header' => 'asdf',
),
)); ?>
The pager is defining the conf of the CLinkPager
I’m using CListView in my blog, and got some question about customizing pagination.
Here what I got:
PostController.php:
$dataProvider=new CActiveDataProvider('Post',
array(
'criteria'=>$criteria,
'pagination'=>array(
'pageSize'=>1,
),
)
);
and this is view:
<?php $this->widget('zii.widgets.CListView', array(
'dataProvider'=>$dataProvider,
'itemView'=>'_view',
'enableSorting'=>true,
'template'=>"{items}\n{pager}", //this remove: Displaying #... of ... result
'cssFile'=> Yii::app()->theme->baseUrl.'/style.css',
)); ?>
How could I remove “Go to page:” near pagination area ? (I couldn’t find any solution for CListView… and there is no such property as ‘header’ for CListView/CPagination, only for CLinkPager).
Thanks!
hi friends
$dataProvider=new CActiveDataProvider(‘Post’,
array(
'criteria'=>$criteria,
'totalItemCount'=>100,
'pagination'=>array(
'pageSize'=>10,
),
)
);