HOC SiteDocumentation

Layout

Layout sets the content column width and the breakpoint ranges that block style maps use. Reads need website access. Writes need update_header_footer.

Content width

maxContentWidthPx is an integer from 320 to 2560. The default is 1280. The public site sets --site-max-content-width to that value in pixels.

Breakpoints

Send 2 to 8 breakpoints. Each has a unique id matching ^[a-z][a-z0-9-]*$, a label, and optional minWidth and maxWidth. The first breakpoint starts at 0. Ranges are contiguous: the next minWidth is the previous maxWidth plus 1. Only the last breakpoint omits maxWidth. The default is mobile from 0 to 767 and desktop from 768 with no max.

Block style maps

Block props such as sizeByBreakpoint are keyed by breakpoint id. Renaming or removing an id leaves the old keys in saved content. They no longer match a breakpoint.

Read layout settings.

GET /api/v1/{locale}/{websiteId}/layout

Replace layout settings.

PUT /api/v1/{locale}/{websiteId}/layout
{
  "maxContentWidthPx": 1280,
  "breakpoints": [
    { "id": "mobile", "label": "Mobile", "minWidth": 0, "maxWidth": 767 },
    { "id": "desktop", "label": "Desktop", "minWidth": 768 }
  ]
}

MCP: get_theme (section=layout), save_theme (section=layout).