From Where This Css Class Is Coming?

I searched all yii code to find the source of this css class "pager", it change the whole pagination …




<div class="pager"> <-- Where is the source file

     <div class="pagination">

          <ul id="yw1" class="yiiPager">

               <li class="previous"><a href="/test/article/list/999">←</a></li>

               <li class=""><a href="/test/article/list/999">1</a></li>

               <li class=" active"><a href="/test/article/list/999?Article_page=2">2</a></li>

               <li class=""><a href="/test/article/list/999?Article_page=3">3</a></li>

               <li class="next"><a href="/test/article/list/999?Article_page=3">→</a></li>

          </ul>

     </div>

</div>



Sources of this css classes are located exactly in two places :

  1. FRAMEWORK_PATH / zii / widgets / assets / gridview / styles.css

  2. FRAMEWORK_PATH / zii / widgets / assets / listview / styles.css

You can easily override this class to use your custom one. All you need to do is to pass proper parameter in config array for your widget (CListView or CGridView), like in the following example:


$this->widget('zii.widgets.CListView', array(

    'pagerCssClass' => 'your-custom-css',

    'other_option' =>,

    ....

));

We can overwrite by adding css to your grid view.


'options' => array(

                'class'=> 'your_css_style',

        ),

Thanks, I got it …

‘pagerCssClass’=>‘pagination’,

but i was palcing under pager array … not it fine ;)