Skip to main content

ValidStaticBlockType

Makes sure that all static blocks are using valid types.


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

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" %}

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" %}

The following example contains the default configuration for this check:

ValidStaticBlockType:
enabled: true
severity: error
ParameterDescription
enabledWhether this check is enabled.
severityThe severity of the check.

Anchor to Disabling this checkDisabling this check

Disabling this check isn't recommended.


Was this page helpful?