Skip to content

Commit f1c8a96

Browse files
committed
:empty: and :notempty:
1 parent 4361649 commit f1c8a96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/5.x/system/relations.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Property
244244
: One of `element`, `sourceElement`, or `targetElement`
245245

246246
Accepts
247-
: Element ID, element, [element query](../development/element-queries.md), or an array thereof
247+
: Element ID, element, [element query](../development/element-queries.md), special `:empty:` or `:notempty:` tokens, or an array thereof
248248

249249
Description
250250
: - Use `element` to get results on either end of a relational field (source _or_ target);
@@ -263,6 +263,8 @@ One way of thinking about the difference between `sourceElement` and `targetElem
263263
{# -> Equivalent to `recipe.ingredients.all()`, from our very first example! #}
264264
```
265265

266+
The special `:notempty:` and `:empty:` tokens allow you to query for elements that are related (or _not_ related) to _any_ other element. These can be combined with [field](#fields) and [site](#sites) conditions.
267+
266268
### Fields
267269

268270
Property

0 commit comments

Comments
 (0)