Skip to content
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

Allow nested fields in where clause #5637

Closed
regisphilibert opened this issue Jan 25, 2019 · 3 comments · Fixed by #5676
Closed

Allow nested fields in where clause #5637

regisphilibert opened this issue Jan 25, 2019 · 3 comments · Fixed by #5676

Comments

@regisphilibert
Copy link
Member

regisphilibert commented Jan 25, 2019

Currently the following:

{{ $pages := where .Site.RegularPages ".Params.author.name" "John" }}

Returns an error.

Maybe this is similar enough to #5522 that it can be treated in the same timeframe/by the same person.

@regisphilibert regisphilibert changed the title Allow where clause using nested Params Allow nested Params with where clause Jan 25, 2019
@bep
Copy link
Member

bep commented Jan 25, 2019

I agree that this should just work, but I think I created a very similar issue some time ago, but that doesn't matter too much.

@bep bep added this to the v0.54 milestone Jan 25, 2019
@bep bep changed the title Allow nested Params with where clause Allow nested fields in where clause Jan 25, 2019
@bep bep modified the milestones: v0.54, v0.55, v0.56 Jan 25, 2019
@tryzniak
Copy link
Contributor

tryzniak commented Feb 3, 2019

I'm working on this one. I think this issue is related to #5416.

tryzniak added a commit to tryzniak/hugo that referenced this issue Feb 4, 2019
Before this commit `where` would produce an error and bail building the
site. Now, `where` simply skips an element of a collection and does not
add it to the final result.

Closes gohugoio#5637
Closes gohugoio#5416
@bep bep closed this as completed in #5676 Feb 6, 2019
bep pushed a commit that referenced this issue Feb 6, 2019
Before this commit `where` would produce an error and bail building the
site. Now, `where` simply skips an element of a collection and does not
add it to the final result.

Closes #5637
Closes #5416
@bep bep modified the milestones: v0.56, v0.55 Feb 6, 2019
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants