Thanks to visit codestin.com
Credit goes to github.com

Skip to content

where statement doesn't match result of if statement when used to check page parent #14777

@ThatHackerDudeFromCyberspace

Description

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.160.0+extended+withdeploy linux/amd64 BuildDate=unknown

Does this issue reproduce with the latest release?

Yes

The following snippets:

where site.AllPages "Parent" "eq" $page
where site.AllPages "Parent" $page

Results in an empty list, wheras the following works fine:

{{ range site.AllPages }}
  {{- if eq .Parent $page -}}
    ...
  {{- end -}}
{{- end -}}

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions