---
title: SchemaPresetsStaticBlocks
description: Warns if a preset static block doesn't have a content_for block tag.
source_url:
  html: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks
  md: >-
    https://shopify.dev/docs/storefronts/themes/tools/theme-check/checks/schema-presets-static-blocks.md
---

# SchemaPresetsStaticBlocks

Warns if a preset static block doesn't have a corresponding `content_for` block tag.

***

## Examples

The following examples contain code snippets that either fail or pass this check.

### ✗ Fail

In the following example, the static preset block with `id: "block_2"` is missing a `content_for` block:

```liquid
{% content_for "block", type: "text", id: "block_1" %}


{% schema %}
  "presets": [
    {
      "name": "My preset",
      "blocks": {
        "block_1": {
          "type": "text",
          "static": true
        },
        "block_2": {
          "type": "slide",
          "static": true
        }
      }
    }
  ]
{% endschema %}
```

### ✗ Fail

In the following example, the static preset block with `id: "block_2"` is missing a `content_for` block:

```liquid
{% content_for "block", type: "text", id: "block_1" %}


{% schema %}
  "presets": [
    {
      "name": "My preset",
      "blocks": [
        {
          "type": "text",
          "static": true,
          "id": "block_1"
        },
        {
          "type": "slide",
          "static": true,
          "id": "block_2"
        }
      ]
    }
  ]
{% endschema %}
```

### ✓ Pass

In the following example, all static preset blocks have a `content_for` block:

```liquid
{% content_for "block", type: "text", id: "block_1" %}
{% content_for "block", type: "slide", id: "block_2" %}


{% schema %}
  "presets": [
    {
      "name": "My preset",
      "blocks": {
        "block_1": {
          "type": "text",
          "static": true
        },
        "block_2": {
          "type": "slide",
          "static": true
        }
      }
    }
  ]
{% endschema %}
```

### ✓ Pass

In the following example, all static preset blocks have a `content_for` block:

```liquid
{% content_for "block", type:"text", id:"block_1" %}
{% content_for "block", type:"slide", id:"block_2" %}


{% schema %}
  "presets": [
    {
      "name": "My preset",
      "blocks": [ {
          "type": "text",
          "static": true,
          "id": "block_1"
        },
        "block_2": {
          "type": "slide",
          "static": true,
          "id": "block_2"
        }
      ]
    }
  ]
{% endschema %}
```

***

## Options

The following example contains the default configuration for this check:

```yaml
SchemaPresetsStaticBlocks:
  enabled: true
  severity: error
```

| Parameter | Description |
| - | - |
| `enabled` | Whether this check is enabled. |
| `severity` | The [severity](https://shopify.dev/docs/storefronts/themes/tools/theme-check/configuration#check-severity) of the check. |

***

## Disabling this check

Disabling this check isn't recommended.

***
