From ea0bf2d30b86bc12d4097e1368c184e418e0db3f Mon Sep 17 00:00:00 2001 From: Samuel Date: Fri, 19 Oct 2018 10:52:36 -0400 Subject: [PATCH] fix braces --- filters/where.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/filters/where.md b/filters/where.md index 06c12ff..d58adbb 100644 --- a/filters/where.md +++ b/filters/where.md @@ -3,7 +3,7 @@ title: where description: Liquid filter that selects from arrays. --- -Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy/truthy" | prepend: site.baseurl }}) value by default. +Creates an array including only the objects with a given property value, or any [truthy]({{ "/basics/truthy-and-falsy#truthy" | prepend: site.baseurl }}) value by default. In this example, assume you have a list of products and you want to show your kitchen products separately. Using `where`, you can create an array containing only the products that have a `"type"` of `"kitchen"`. @@ -38,21 +38,21 @@ Kitchen products: ``` -Say instead you have a list of products and you only want to show those that are available to buy. You can `where` with a property name but no target value to include all products with a [truthy]({{ "/basics/truthy-and-falsy/truthy" | prepend: site.baseurl }}) `"available"` value. +Say instead you have a list of products and you only want to show those that are available to buy. You can `where` with a property name but no target value to include all products with a [truthy]({{ "/basics/truthy-and-falsy#truthy" | prepend: site.baseurl }}) `"available"` value.

Input

{% raw %} ```liquid All products: {% for product in products %} -- {% product.title %} +- {{ product.title }} {% endfor %} {% assign available_products = products | where: "available" %} Available products: {% for product in available_products %} -- {% product.title %} +- {{ product.title }} {% endfor %} ``` @@ -80,7 +80,7 @@ The `where` filter can also be used to find a single object in an array when com ```liquid {% assign new_shirt = products | where: "type", "shirt" | first %} -Featured product: {% new_shirt.title %} +Featured product: {{ new_shirt.title }} ``` {% endraw %}