mirror of
https://github.com/Shopify/liquid.git
synced 2026-10-03 00:55:11 -07:00
I think there should be a line of doc on how to know the site of an array.
+6
-1
@@ -168,10 +168,15 @@ optionally, `elsif` and `else`) clause:
|
|||||||
```
|
```
|
||||||
|
|
||||||
```liquid
|
```liquid
|
||||||
# Check for an empty array
|
# Check for the size of an array
|
||||||
{% if user.payments == empty %}
|
{% if user.payments == empty %}
|
||||||
you never paid !
|
you never paid !
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if user.payments.size > 0 %}
|
||||||
|
you paid !
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
```liquid
|
```liquid
|
||||||
|
|||||||
Reference in New Issue
Block a user