DeprecatedGlobalAppBlockType
Deprecated
This check only exists in Theme Check v1.X.X.
Deprecated:
This check only exists in Theme Check v1.X.X.
Makes sure that theme sections are not using the deprecated @global block type to support or render app blocks in a section. Sections should use @app instead.
Anchor to ExamplesExamples
The following examples contain code snippets that either fail or pass this check.
Anchor to ✗ Fail✗ Fail
{% for block in section.blocks %}
{% if block.type = "@global" %}
{% render block %}
{% endif %}
{% endfor %}
{% schema %}
{
"name": "Product section",
"blocks": [{"type": "@global"}]
}
{% endschema %}
Anchor to ✓ Pass✓ Pass
{% for block in section.blocks %}
{% if block.type = "@app" %}
{% render block %}
{% endif %}
{% endfor %}
{% schema %}
{
"name": "Product section",
"blocks": [{"type": "@app"}]
}
{% endschema %}
Anchor to Disabling this checkDisabling this check
Disabling this check isn't recommended.
Was this page helpful?