CPagination - controlling number of page indexes

At the top of CPagination, I notice the default number of page index is set to 10.

Can I reduce this number to say 6 indexes?

E.g. from this

Go to page: << First < Previous 3 4 5 6 7 8 9 10 11 12 Next >

to this

Go to page: << First < Previous 3 4 5 6 7 8 Next >

I am trying to fit this into a smaller column.

P.S. I did try the search and can’t find the answer.

You probably use the widget CLinkPager. When calling this, you should pass ‘maxButtonCount’=>6 in the second argument.

Thank you. Works like a charm.