--- title: LiquidTag description: Suggests liquid delimiters for multiple consecutive Liquid tags. source_url: html: >- https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag md: >- https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md --- ExpandOn this page * [Examples](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md#examples) * [Options](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md#options) * [Disabling this check](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md#disabling-this-check) # LiquidTag Deprecated This check only exists in Theme Check `v1.X.X`. Recommends using [`{% liquid ... %}`](https://shopify.dev/docs/api/liquid/tags/liquid) if four or more consecutive Liquid tags (`{% ... %}`) are found. This helps to eliminate repetitive tag markers (`{%` and `%}`) in theme files. *** ## Examples The following examples contain code snippets that either fail or pass this check. ### ✗ Fail ```liquid {% if collection.image.size != 0 %} {% assign collection_image = collection.image %} {% elsif collection.products.first.size != 0 and collection.products.first.media != empty %} {% assign collection_image = collection.products.first.featured_media.preview_image %} {% else %} {% assign collection_image = nil %} {% endif %} ``` ### ✓ Pass ```liquid {%- liquid if collection.image.size != 0 assign collection_image = collection.image elsif collection.products.first.size != 0 and collection.products.first.media != empty assign collection_image = collection.products.first.featured_media.preview_image else assign collection_image = nil endif -%} ``` *** ## Options ```yaml LiquidTag: enabled: true min_consecutive_statements: 5 ``` | Parameter | Description | | - | - | | enabled | Whether this check is enabled. | | min\_consecutive\_statements | The maximum (inclusive) number of consecutive statements before the check recommends a refactor. | *** ## Disabling this check This check is safe to [disable](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration). *** * [Examples](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md#examples) * [Options](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md#options) * [Disabling this check](https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/liquid-tag.md#disabling-this-check)