Hugo

Paginate checks two "Type"?

Hello guys,

How can I check two “Type” in a .Paginate?

{{ $paginator := .Paginate (where .Site.Pages "Type" "special").Reverse }}

I want to add to also check for Type "opinion" tried with OR but, can’t wrap my head around it.

Doc: https://gohugo.io/templates/pagination/

You can only have one .Paginator on a given .Page

See: https://gohugo.io/functions/union#or-filter-in-where-query

1 Like

I may have explained it wrong. I want to check two “types”.

{{ $paginator := .Paginate (where .Site.Pages "Type" "special").Reverse }}

That only checks the “special” type. Do you have any idea of how can I check another one?

Oh, wow, just in case someone also wonders about this:

Here’s the full solution!