Skip to content

Pagination by years #57

Answered by bennothommo
oim37 asked this question in Q&A
Discussion options

You must be logged in to vote

My thinking is that you will probably have to do a custom component to make this happen.

You could perhaps create a plugin and component that extends the \Winter\Blog\Components\Posts component, and change up the listPosts() method to instead group the collection of posts by year (using the groupBy() method and function that returns the year of each post).

You would also have to change up the component partials to accept this new format.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by oim37
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants