-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Add a pageGroup func (or similar) #4865
Labels
Milestone
Comments
See my comment and the rest of the discussion in #4866 (comment) |
bep
pushed a commit
that referenced
this issue
Sep 8, 2018
This also adjusts the pagination logic to allow for these new collections. Note that we will follow up with a template function named `group` that will be the end user API. The `.Group` method on `Page` should be considered as internal. Updates #4865
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 8, 2018
This extends the page grouping in Hugo with a template function that allows for ad-hoc grouping. A made-up example: ``` {{ $cool := where .Site.RegularPages "Params.cool" true | group "cool" }} {{ $blue := where .Site.RegularPages "Params.blue" true | group "blue" }} {{ $paginator := .Paginate (slice $cool $blue) }} ``` Closes gohugoio#4865
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 8, 2018
This extends the page grouping in Hugo with a template function that allows for ad-hoc grouping. A made-up example: ``` {{ $cool := where .Site.RegularPages "Params.cool" true | group "cool" }} {{ $blue := where .Site.RegularPages "Params.blue" true | group "blue" }} {{ $paginator := .Paginate (slice $cool $blue) }} ``` Closes gohugoio#4865
bep
added a commit
to bep/hugo
that referenced
this issue
Sep 8, 2018
This extends the page grouping in Hugo with a template function that allows for ad-hoc grouping. A made-up example: ``` {{ $cool := where .Site.RegularPages "Params.cool" true | group "cool" }} {{ $blue := where .Site.RegularPages "Params.blue" true | group "blue" }} {{ $paginator := .Paginate (slice $cool $blue) }} ``` Closes gohugoio#4865
bep
added a commit
that referenced
this issue
Sep 8, 2018
This extends the page grouping in Hugo with a template function that allows for ad-hoc grouping. A made-up example: ``` {{ $cool := where .Site.RegularPages "Params.cool" true | group "cool" }} {{ $blue := where .Site.RegularPages "Params.blue" true | group "blue" }} {{ $paginator := .Paginate (slice $cool $blue) }} ``` Closes #4865
bep
added a commit
that referenced
this issue
Sep 8, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
As discussed in https://discourse.gohugo.io/t/paginate-from-slice-of-page/12524 , Paginate currently do not accept a (plain) slice of Page, nor a Dict to used as PagesGroup. it would be a useful extension when specific ordering or grouping have to be used in templates
The text was updated successfully, but these errors were encountered: