From 03922249146b81286438f36c125b7a6a7e1403ff Mon Sep 17 00:00:00 2001 From: Fabrizio Regini Date: Tue, 19 Nov 2013 07:10:07 -0800 Subject: [PATCH] I think there should be a line of doc on how to know the site of an array. --- Liquid-for-Designers.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Liquid-for-Designers.md b/Liquid-for-Designers.md index a082ef1..44fbe85 100644 --- a/Liquid-for-Designers.md +++ b/Liquid-for-Designers.md @@ -168,10 +168,15 @@ optionally, `elsif` and `else`) clause: ``` ```liquid -# Check for an empty array +# Check for the size of an array {% if user.payments == empty %} you never paid ! {% endif %} + +{% if user.payments.size > 0 %} + you paid ! +{% endif %} + ``` ```liquid