Clist View Css

Guys I have been trying to figure this out, how can I change the CSS style of CListView regarding the pagination numbers.

I want to customize it, so if I include ‘cssFile’=>‘this.css’, what exactly is happening there?

  1. Where do I place the CSS? meaning what folder does it point to by default.

  2. What CSS class or id do I use to access the pagination? for instance how do I change the colour of the pagination. The original pager.css has <ul id="yw1" class="yiiPager"> is that what I call on my CSS?

  3. What issues will I face if I change the Assets CSS? I have changed it already on my localhost, is going to reset once I deploy it live?

  4. Do the questions make sense or am I confused?

Can shed some light

Thanks

Did you try rowCssClassExpression ?

Thanks for the reply, though you may have misunderstood my question. I want to customize the numbering of the pages. The next button, previous button, the font size, colour-background, etc.

Regards

disble the existing pager.css file. copy and customize existing pager.css and load it into your theme. To add and remove use this link

http://www.bsourcecode.com/2013/01/yii-clinkpager-override.html

That’s done it nicely, thank you. I have one more question, would it be possible to have different CSS pagers for different views. Since all ClistView will use /css/pager.css is there a way to have 2 different CSS’ for 2 different ClisViews

Thanks

Dear Friend

First just copy the pager.css file from from yii/framework/web/widgets/pager folder

and paste inside the webapp/css folder.

Then instantiate a pager class in CListView widget in the following way.




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

	'dataProvider'=>$dataProvider,

	'itemView'=>'_view',

	'pager'=>array(

	    'class'=>"CLinkPager",

	    'cssFile'=>"css/pager.css",

	   ),

)); ?>



Now you can make the changes inside the pager.css file in css folder.

The changes are reflected readily.

Regards.