A simple scenario: I’m paginating a bunch of posts—8 posts per page—but I just want the first 7 on page 1.
I know I can manually display the first 7 posts then display the rest using ->offset(), but then I won’t be able to use my usual pagination snippet.
Right now I’m appending an empty post to the top of my collection, paginating it, then removing the first post. It works fine, but it seems like a kludge in my controller.
No, this won’t help. Basically, what @nigel wants is a pagination object with a different number of elements in each page, so we need to slice up the collection into different pieces and still get a pagination object.
I don’t know if there is an easy way to achieve this without custom methods or a custom pagination class. What is your current code to achieve your workaround?