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 · 2 comments

Comments

Projects
None yet
3 participants
@regisphilibert
Copy link

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

This comment has been minimized.

Copy link
Member

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 the Enhancement label Jan 25, 2019

@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

This comment has been minimized.

Copy link
Contributor

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

Support nested keys/fields with missing values with the `where` function
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 in #5676 Feb 6, 2019

bep added a commit that referenced this issue Feb 6, 2019

Support nested keys/fields with missing values with the `where` function
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.