When needed, I use a range statement like below to exclude content that is under the same content folder but uses a custom layout.
{{range where .Pages "Layout" "not in" (slice "a" "b" "c" "d")}}
Instead of listing all the content to exclude either by Type or Layout, I figured out that can I range through content that has no specified layout by doing:
{{range where .Pages "Layout" "" ""}}
Is there a better way of doing this to make the code more understandable?
I guess my post wasn’t clear. Sorry about that. I’m not interested in adding an actual comment to my code. Instead, I was wondering if there is a clearer way of writing:
{{range where .Pages "Layout" "" ""}}
It’s the "" "" that I don’t like.
A stylized example would be:
{{range where .Pages "Layout" "in" "Builtin"}}
Builtin denoting the standard Hugo layouts, index, list, single etc.