New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items sorted at PaginationGenerator #61

Closed
yosymfony opened this Issue Nov 13, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@yosymfony
Copy link
Member

yosymfony commented Nov 13, 2015

With this two new attributes: sort_by and sort_type you will be able to control how items are sorted at PaginationGenerator. sort_type only supports ascending and descending values. Descending is the default behavior:

In the below example date value is the name of the attribute used as criteria for sorting:

generator: pagination
provider: site.posts
max_page: 5
sort_by: date

Example with ascending order:

generator: pagination
provider: site.posts
max_page: 5
sort_by: date
sort_type: ascending

Generator details at #45 .
Implementation: 268d3cc

@yosymfony yosymfony added the 2.0 label Nov 13, 2015

@yosymfony yosymfony added this to the Spress 2.0.0 rc milestone Nov 13, 2015

yosymfony added a commit that referenced this issue Nov 13, 2015

@yosymfony yosymfony closed this Nov 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment