marvix
October 14, 2013, 8:42am
1
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>
mrk
(Miroslaw Farajewicz)
October 14, 2013, 9:08am
2
Sources of this css classes are located exactly in two places :
FRAMEWORK_PATH / zii / widgets / assets / gridview / styles.css
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' =>,
....
));
nachi
(Innovativenachi)
October 14, 2013, 9:40am
3
We can overwrite by adding css to your grid view.
'options' => array(
'class'=> 'your_css_style',
),
marvix
October 14, 2013, 10:58am
4
Thanks, I got it …
‘pagerCssClass’=>‘pagination’,
but i was palcing under pager array … not it fine