Assuming that .Params.language
is english
the code below will give me all content items with languages = ["english", ...]
{{ range (index .Site.Taxonomies.languages .Params.language )}}
{{ .Render "list_item" }}
{{ end }}
The code below will give me all the content items with categories = ["videos", ...]
{{ range (index .Site.Taxonomies.categories "videos" ) }}
{{ .Render "list_item" }}
{{ end }}
I am trying to get a range of content items with both languages = ["english", ...]
and categories = ["videos", ...]
.
I’ve tried the code below. It doesn’t give any build errors, but no items are returned. Is intersect the right way to be trying to do this?
{{ range (intersect (index .Site.Taxonomies.languages .Params.language ) (index .Site.Taxonomies.categories "videos" ))}}
{{ .Render "list_item" }}
{{ end }}