How to check for 'not in' in if statements?

Thanks Bep, for leading me to the right path. :slight_smile: I moved the first parenthesis a one step to the right and it worked. The code is now:

{{ if isset .Params "categories" }}
    {{ if not (in .Params.categories "Meta") }}
        <!-- Hugo code here -->
    {{ end }}
{{ end }}
2 Likes