Valid Static Block Type
Makes sure that all static blocks are using valid types.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
In the following example, there is no corresponding block-does-not-exist.liquid file in the blocks directory of the theme:
{% content_for "block", type: "block-does-not-exist", id: "static-block-1" %}
Anchor to ✓ Pass✓ Pass
In the following example, block-exists.liquid exists in the blocks directory of the theme:
{% content_for "block", type: "block-exists", id: "static-block-1" %}
Anchor to OptionsOptions
The following example contains the default configuration for this check:
ValidStaticBlockType
enabledtrue
severityerror
| Parameter | Description |
|---|---|
enabled | Whether this check is enabled. |
severity | The severity of the check. |
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?