Skip to content

Making the pagination parameter configurable - RFC #678

@DorsetDigital

Description

@DorsetDigital

We've come across a few issues with pagination when using (in particular) Stackpath CDN. Sometimes, the presence of the 'start' parameter upsets the CDN (because.. reasons).

My immediate thought was that the pagination parameter should be configurable in the blog. The PaginatedList class has methods to support this, and the blog already reads the parameter name when doing its pagination. What I can't see is any method for setting the parameter in the blog system.

I found an open issue here silverstripe/silverstripe-framework#8306 regarding changing the pagination system altogether, but that issue is quite old, so I'm guessing there's no movement on it.

So, before I charge headlong into a PR, I wanted to gather some opinion:

Is it worth trying to do this as part of the blog module, or would it be better for me to look at a PR on PaginatedList to make the pagination parameters pretty instead and do away with the get var altogether?

Assuming it's worth pursuing here... my thinking was that I would make the parameter a config option on the BlogController, so it could be set via yml, etc. Then in BlogController::PaginatedList() call PaginatedList::setPaginationGetVar() to do the business.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions