This is a tutorial show you how to make yii pagination with CActiveDataProvider in Yii Framework. Let check it out !

In controllers, where data you want to set pagination but the following code:

'pagination' => array(
                 'pageSize' => 2,
            )));

With PageSize is the number of item per page.
So the full code of CActiveDataProvider will look like:

$dormProvider = new CActiveDataProvider('Dorm', array(
            'pagination' => array(
                    'pageSize' => 2,
        )));

In view, put this code in ClistView

'enablePagination'=>true,

ClistView will be look like

<?php
    $this->widget('zii.widgets.CListView', array(
      'dataProvider'=>$dormProvider,
      'itemView'=>'__viewDorm',
      'enablePagination'=>true,
    ));
  ?>

Here you will see page toolbar

You also can change interface of paging menu by changing attribute of pager in ClistView.
'pager'=>array(
    'class'=>'CLinkPager',
    'cssFile'=>false,
    'header' =>'Test page',
    'prevPageLabel'=>'&lsaquo;',
    'nextPageLabel'=>'&rsaquo;',
    'firstPageLabel'=>'&laquo;',
    'lastPageLabel'=>'&raquo;',
    'selectedPageCssClass' => 'active',
  ),

So it will look like