Skip to content

Sections ​

A section is one block of a storefront page. Each belongs to one theme and one channel, carries content per locale, and is drawn in the order the channel gives it.

Types ​

TypeWhat it draws
image_carouselA slider of images, each with its own link.
product_carouselProducts chosen by a filter, drawn as a slider.
category_carouselCategories chosen by a filter, drawn as a slider.
footer_linksThe footer link columns.
static_contentFree HTML and CSS.
services_contentThe service badges strip, each with an icon.

The type decides the fields a section carries. adminAppearanceSectionFields returns that field set as a schema together with the values currently held, which is enough to build an editor without hard-coding any type.

Two rules the storefront depends on ​

  • One footer per channel. A channel can hold at most one footer_links section; creating a second, or switching another section to that type, is rejected with 422.
  • The footer is drawn last. A reorder that places footer_links anywhere but the end has it moved back, and the response returns the order that was actually stored.

Staged edits ​

Nothing a client writes through the draft endpoints reaches shoppers until it is published:

StagedEndpointHeld in
Content, per localecreateAdminAppearanceSectionDraftdraftOptions on the translation
On/offcreateAdminAppearanceSectionStatusdraftStatus
Render ordercreateAdminAppearanceSectionReorderdraftSortOrder

hasDraft on a section is true while any of the three is set. createAdminAppearanceSectionPublish promotes every staged edit of a theme and channel at once; createAdminAppearanceSectionDiscard throws them all away. adminAppearanceSectionPreview returns the theme as those staged edits would leave it.

Creating a section stages it switched off, so an unbuilt section is never shown. Writing published values directly — without the draft cycle — is what updateAdminAppearanceSection does.

Media ​

Images and videos are uploaded through the REST endpoint Upload media — a binary upload cannot be carried over GraphQL — which returns a stored path. The client then records that path in the section's options through the draft or update endpoint. Uploading does not change what a section shows.

Operations ​

OperationPurpose
adminAppearanceSectionsSections of a theme and channel, in render order
adminAppearanceSectionOne section with its translations
createAdminAppearanceSectionAdd a section
updateAdminAppearanceSectionWrite published values
deleteAdminAppearanceSectionRemove a section
createAdminAppearanceSectionDraftHold options as a draft
createAdminAppearanceSectionStatusStage on/off
createAdminAppearanceSectionReorderStage render order
createAdminAppearanceSectionDuplicateCopy a section
createAdminAppearanceSectionPublishPromote staged edits
createAdminAppearanceSectionDiscardThrow staged edits away
adminAppearanceSectionFieldsField schema and current options
adminAppearanceSectionPreviewTheme with staged edits applied

Permissions ​

ActionPermission
Read, fields, previewappearance.sections
Create, copyappearance.sections.create
Update, draft, status, order, publish, discardappearance.sections.edit
Deleteappearance.sections.delete

Released under the MIT License.