Yii CLinkPager Override

We can change the existing style of yii pagination. I followed two steps to create the customized pagination of yii.

Disable Yii Pager.css

Add the following line into config/main.php file. It will disable the existing pagination style and add your own css pagination.

<?php
        'widgetFactory'=>array(
            'widgets'=>array(
                'CLinkPager'=>array(
                    'maxButtonCount'=>5,
                    'cssFile'=>false,
                ),
            ),
        ),

Add Your Pager.css

<?php
    <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/pager.css" ></link> 
?>

I added new pager.css file into “theme/css/pager.css” folder.