Any way to remove "per page" param from pagination URL's?

I have created a pagination system using Yii’s pagination class as well as the LinkPager and I can’t seem to get rid of the “per-page” param in the links.

The “per page” is set internally and cannot be massively assigned, so whilst it’s not a huge deal it’s in there, I’d prefer to keep it out if possible.

Is there any way to do this? I tried setting the “pageSizeParam” of the Pagination class to empty but that didn’t work. :(

1 Like

Nevermind, I worked it out.

If it helps others, you just need to remove the "pageSize" param from the config section and set the "defaultPageSize" instead.

Edit: Actually set both the "pageSize" and the "defaultPageSize". Not sure if it is a bug or what but when I removed the setting of the "pageSize" it honored whatever setting I put in the "per-page" param in the request even though I have marked it as unsafe.

great :)