Doesn't Overlap Modifier
The inverse of overlaps. Returns true when none of the needle values are found in the haystack array, otherwise false.
The first parameter is the "needle" to compare against the "haystack". The needle can be a single value or an array. In Antlers method syntax, pass a variable without quotes to use its value.
shopping_list:
- eggs
- flour
- beef jerky
avoid:
- kale
- tofu
{{ if shopping_list | doesnt_overlap(avoid) }} All clear! {{ /if }}
{{ if shopping_list | doesnt_overlap('flour') }} Nope, there's flour. {{ /if }}
@if (Statamic::modify($shopping_list)->doesntOverlap('avoid')->fetch()) All clear! @endif
@if (Statamic::modify($shopping_list)->doesntOverlap('flour')->fetch()) Nope, there's flour. @endif
All clear!