Documentation Index
Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt
Use this file to discover all available pages before exploring further.
Storefront Snippets
Storefront snippets are Aqua/Liquid include files your app installs into a merchant’s theme namespace. Themes (or the merchant’s own storefront blocks) reference them with{% render 'your-snippet' %} just like a theme-author snippet.
Use snippets when you ship reusable Liquid fragments your blocks or the
merchant’s theme should be able to include — star ratings, badge
components, formatted price markup, etc.
When to Use Snippets
- A markup fragment your storefront block needs in two places.
- A reusable component you want the merchant’s theme to be able to include directly (e.g. a “verified buyer” pill the merchant drops into their existing product card).
- Liquid logic you want to share between two of your own blocks without duplicating it.
Manifest
Declare snippets inapp.json under extensions.storefrontSnippets:
| Field | Required | Description |
|---|---|---|
handle | yes | The include name. Themes call {% render 'review-stars' %} (no path, no .aqua extension). |
appId | no | App identifier override; defaults to the install directory name. |
Install — Inline Mode
When installing viaPOST /api/apps/install-extensions, ship the snippet
body as a template string:
app.json so the manifest reflects the installed snippets.
Install — fromCatalog Mode
For first-party marketplace apps, the catalog directorypublic/marketplace-apps/apps/{appHandle}/snippets/ is copied as-is.
Snippets live alongside the app’s blocks and assets under the same
manifest.
Rendering — Naming Collisions
All installed apps share one Aqua include namespace. If two apps both install a snippet calledreview-stars, the render engine picks the one
whose snippet directory was registered first; the loser’s snippet is
shadowed silently.
The install endpoint detects this case and logs a warning:
foundry-review-stars rather than review-stars. This
mirrors Shopify’s app-name-component-name convention.
Using Snippets From Your Block
Reference your snippet by handle from your block’s.aqua template:
block_* variables
into the snippet scope, so a snippet rendered from inside a block can
access block.settings.<id> without re-passing it.
Using Snippets From The Merchant’s Theme
Once installed, the merchant (or their theme developer) can reference your snippet from their own theme files:Inspecting Installed Snippets
Uninstalling
Snippets are removed byPOST /api/apps/uninstall-extensions along with
the rest of the app’s extension directory. Themes that still reference an
uninstalled snippet render the failure inline — Liquid error: snippet 'foundry-review-stars' not found — so warn merchants before they
uninstall an app whose snippets their theme uses.
See Also
- Theme Blocks — Liquid blocks merchants place in sections (snippets are typically rendered from blocks).
- App Scripts — auto-injected JavaScript.
- Aqua Tags —
{% render %},{% include %}, etc.