I’m trying to determine the correct syntax for using the “in” operator with where and .Paginate. So far I have not come across an example. If someone has an example, would you please post it here? Thank you!
Or perhaps I am considering the wrong operator? Should it be intersects? Either way I could use syntax help.
I am looking to paginate the category list for more than one type and keep the order by date.
Currently looks like:
{{ $paginator := .Paginate (where .Data.Pages “Type” “post”) }}
I’d like to also include type “program”.
This is wrong, but it gives the idea:
{{ $paginator := .Paginate (where .Data.Pages “Type” (in “post” “program”)) }}
PS. Another possibly related question is if its not possible to do it that way and I have to use 2 where’s:
{{ $postPages := (where .Data.Pages “Type” “post”) }}
{{ $programPages := (where .Data.Pages “Type” “program”) }}
How would I concatenate those page lists and order by the date? I would prefer the first thought to work if possible. Thanks again!!