--- url: https://developer.youcan.shop/themes/tags/unless.md --- # `unless` The opposite of [`if`](./if.md), we output the encapsulated block only if the evaluated condition is falsy. ::: info TIP Similarly to [`if`](./if.md), you can use [`elseif`](./if.md#elseif) to handle more conditions. ::: ```liquid {% unless condition %} block_to_output {% endunless %} ``` * `condition`: Falsy condition to evaluate. * `block_to_output`: Rendered expression in case the condition is met. **Example** ::: details Data ```json { "product": { "track_inventory": true } } ``` *Note: Data is only refereed as a reference for this example and is in no means reflecting real world data.* ::: ```liquid {% unless product.track_inventory == false %} Supply is limited. Hurry up! {% endunless %} ``` ::: tip Output Supply is limited. Hurry up! :::