Skip to content
shopdepot.dev

Reference

Reference

Everything a theme can read and call, generated from the platform code.

View as Markdown

These pages are generated from the platform code by bin/console app:dev:reference, with descriptions kept in the documentation. If a field, filter or function is not here, a theme cannot use it.

Twig

Page What it covers
Objects The data a theme reads: shop, product, cart, category, menu, section, block and the rest - every field with its type.
Filters money, image_url, asset_url, t and the allowed Twig filters.
Functions content_for, render, sections, render_widget, the platform components and the data queries.
Tags The allowed Twig tags and the theme tags schema, stylesheet, javascript, doc.

Theme files

Page What it covers
Page types Each page a theme renders, its template, address and variables.
Setting types Every input type for schemas and what the template receives.
Core sections and blocks The library every theme gets, with settings.

Conventions

  • Names are camelCase: product.featuredMedia, cart.itemCount.
  • Money is in minor units: 12900 is 129.00 - format with money.
  • Lists may be empty, single objects may be null: write templates for both.
  • Everything is read-only: objects have no methods that change data. Changes go through the JavaScript APIs and platform forms.