# Static Blocks

Static Theme Blocks give theme developers greater control over how blocks and sections are structured. Unlike regular Theme Blocks, they are rendered statically in Liquid rather than dynamically.&#x20;

Because of this, Static Theme Blocks are especially useful when:&#x20;

* A theme requires blocks that should not be moved or removed by the merchant
* Blocks can be rendered conditionally,&#x20;
* having multiple places where you want to add nested blocks to a section

Static Theme Blocks still allow full access to customizable settings, ensuring flexibility without sacrificing control.

<a href="https://shopify.dev/docs/storefronts/themes/architecture/blocks/theme-blocks/static-blocks" class="button secondary">Shopify Docs</a>

Static Theme Blocks can be created by adding the li-static-block attribute to a \<div>:

{% columns %}
{% column %}
{% code title="Webflow" fullWidth="false" %}

```
li-static-block = Item
```

{% endcode %}
{% endcolumn %}

{% column %}
{% code title="Shopify" fullWidth="false" %}

```html
{% content_for "Item", type: "type", id: "uniqueid" %}
```

{% endcode %}
{% endcolumn %}
{% endcolumns %}

This generates a new block file, which is then referenced directly within the corresponding Liquid file.

<figure><img src="https://497333298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheMDp56vLoqqIp7IZZ2W%2Fuploads%2FBwnagxxNU1lf8bKz5Jum%2FBildschirmfoto%202026-01-07%20um%2017.03.02.webp?alt=media&#x26;token=f209cdb4-b77a-4eae-93de-df842f01c105" alt=""><figcaption></figcaption></figure>

{% tabs %}
{% tab title="li-static-block="Item"" %}
and this: Inside this element, you can then use all the elements as usually. For example li-cf-theme-blocks to nest other blocks inside.
{% endtab %}
{% endtabs %}

#### Loop or conditionally render static blocks.

To loop over or conditionally render a static block, simply wrap it in a `div` and add either `li-for:inside` or `li-if:inside`. This will also be reflected in the Shopify Theme Editor. Learn more about [looping](https://docs.liquiflow.app/liquid-attributes/iteration-lists) and [conditional rendering here.](https://docs.liquiflow.app/liquid-attributes/conditional)

<figure><img src="https://497333298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheMDp56vLoqqIp7IZZ2W%2Fuploads%2FfbVb4LW22krKFwMfAFze%2FBildschirmfoto%202026-01-07%20um%2017.11.26.webp?alt=media&#x26;token=ccbf1b74-f1de-4038-8df3-8e51d87b5d4a" alt=""><figcaption></figcaption></figure>

#### Adding Parameters to your Static Blocks

If you want to pass data into your static blocks, you can use the attribute modifier like this:

{% code title="Webflow" fullWidth="false" %}

```
li-static-block = Item
li-static-block::attributes=current.product: product
```

{% endcode %}

This allows you to access dynamic data from the for loop like this:&#x20;

<figure><img src="https://497333298-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheMDp56vLoqqIp7IZZ2W%2Fuploads%2FyK8eoeWD3uj8zOYE6gSp%2FBildschirmfoto%202026-01-07%20um%2017.16.03.webp?alt=media&#x26;token=bb5443e2-0d0e-492c-b055-4569125f06a5" alt=""><figcaption></figcaption></figure>
