Hi,
I’m kinda blocked and lost with a nested where condition. Some help would be really helpul for I haven’t found any answers on the forum yet.
Here’s what I’m trying to do:
Parse a type of content with a param event_date
greater than now
.
Here’s what I got:
---
title: "My title"
date: 2018-02-18T11:49:51+01:00
draft: false
event_info:
event_date: 2020-12-14
---
{{ range (where (where .Data.Pages "Section" "bal" ) (time (.Params.event_info.event_date)) "ge" $today ) }}
{{ . }}
{{ end }}
returns nothing
If i try to count potential result with:
{{ len (where (where .Data.Pages "Section" "bal" ) (time (.Params.event_info.event_date)) "ge" now ) }}
- This returns 0 instead of 1.
- If I try with
"le"
: return 0 instead of 8. - If I try with
"!="
: return 9 (correct result).
Any idea of what I’m missing ?
Thanks for your time
System information:
- Win7
- Hugo v0.36.1
edit: tried with Hugo v0.37, same results.