Rea
1
I want to only show posts that have a true value for the index
parameter:
+++
index = "true"
+++
How should I place .Params.index
in the {{ range ... }}
?
or how should I filter the list for .Params.index
before {{ range ... }}
?
UPDATE: Take a look at https://gohugo.io/functions/where/#nest-where-clauses for solution.
Iām not sure, but, index
already has meaning, so if you try to make a variable out of it like this, it could cause trouble.
(Edit: removed reference to with
because as @bep points out where
makes sense here, sorry)
bep
3
No, that is not an issue in this case.
@Rea you need to look at the where
func ā it should be plenty of examples both in the documentation and here on the forum.
2 Likes
Rea
5
Thanks. Solved by using āNest where Clausesā.