Skip to content

Commit

Permalink
fixes app block validation per: panoply/vscode-liquid#175
Browse files Browse the repository at this point in the history
CC David
  • Loading branch information
panoply committed Jun 14, 2024
1 parent 43736dc commit 2089e86
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions stores/descriptions/sections/properties/@app.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
App block wrapperAnchor link to section titled **"App block wrapper"**. Merchants can add app blocks to a page in the following ways:

- As a block within the confines of the section that's rendering the block
- In a similar manner to sections, giving them the full width of the page to render content

As app blocks aren't sections themselves, Shopify wraps these full-width app blocks in a platform-generated section by default. However, you can override this default section by creating your own section called apps.liquid.

The `apps.liquid` section schema needs to include a block of type `@app`, as well as a `preset`. If either of these is missing, then an `Apps not supported` or `Apps section is invalid` error is returned in the theme editor and merchants aren't able to use the section.

> **CAUTION**
>
> The `apps.liquid` section schema can't contain the `templates` schema attribute. This also includes the `templates` attribute within the `enabled_on/disabled_on` schema attributes. It's expected that the `apps.liquid` section is available on all templates.
**Example**

```liquid
{% for block in section.blocks %}
{% render block %}
{% endfor %}
{% schema %}
{
"name": "App wrapper",
"settings": [],
"blocks": [
{
"type": "@app"
}
],
"presets": [
{
"name": "App wrapper"
}
]
}
{% endschema %}
```

#

---

[Shopify Documentation](https://shopify.dev/docs/storefronts/themes/architecture/blocks/app-blocks#app-block-wrapper)

0 comments on commit 2089e86

Please sign in to comment.