I am new to Yii. I want to implement custom pagination. I want to change the CSS and the layout. How do I change the CSS of the page numbers and the layout of pagination. I want to show the paging layout like below
<< < 1 2 3 4 > >> instead of default layout provided by Yii like this…[previous] 1 2 3 4 [next].
I am using zii.widget.cLIstview to disply the data. Here is my code…
'class'=>' ', // use if you want to extend CLinkPager
'cssFile'=>false, // to redirect from using the css file in the framework.
// Make sure you load your defined css file as you would with any other
'firstPageLabel'=>' ', //fill in the following as you want
How do I set the parameters for the paging layout of this type < 1…5 6 7 8 9 …30 >. Suppose if I have 30 pages, I want to show the first page number, last page number and show only 5 pages numbers every time. like below
Welcome on my behalf as well. You can find out all the answers to your questions by looking at the CPagination code or consulting the Yii class reference.
If you want to do changes to the page functionality you have to use your own pagination class that preferably extends CPagination and simply overrides the required methods. If you end up doing this you can specify your own pager class for e.g. CListView’s pager options by setting the ‘class’ property.