Skip to content

List page builder blocks

GET
/cms/pagebuilder/blocks

Returns the enabled block types with their settings JSON Schema and their display variants (configured in the CMS). Use it to generate frontend types and to detect variants the frontend does not implement yet; unknown variants should fall back to defaultVariant.

Block definitions

PageBuilderBlocks

The page builder blocks enabled on this deployment, with their settings and display variants as configured in the CMS (Publisher Configuration → Page Builder). Use it to generate frontend types and to detect variants the frontend does not implement yet.

object
schemaVersion

Version of the layout document format

integer
Example
1
breakpoints

Breakpoints, desktop first

Array<string>
Allowed values: lg md xs
Example
[
"lg",
"md",
"xs"
]
blocks

Enabled block types, in the order editors see them

Array<object>
PageBuilderBlockDefinition

A block type and its display variants

object
type

Block type, as used in PageLayoutBlock.type

string
Example
content_list
label

Name shown to editors

string
Example
Content list
kinds

Layout kinds the block can be used on

Array<string>
Allowed values: front landing category_template article_template author_template keyword_template
container

Whether the block holds child blocks (children)

boolean
childTypes

Block types allowed as children of a container

Array<string>
sourceKinds

Content sources of list blocks; empty for blocks without data

Array<string>
Allowed values: section query mostread mostcommented external
settings

JSON Schema of the block’s settings

object
key
additional properties
any
defaultVariant

Variant key used when a block’s variant is unknown or disabled

string
Example
thumb_list
variantFallback

Whether an unknown variant falls back to defaultVariant. False for custom: its variants are components, and an unknown one must render nothing.

boolean
Example
true
variants

Enabled display variants, in editor order

Array<object>
PageBuilderVariant

A display variant of a block type, configured in the CMS. The key is the contract with frontends and never changes.

object
key

Variant key, as used in PageLayoutBlock.variant

string
Example
lead_grid
label

Name shown to editors

string
Example
Lead story + grid
description

Description shown to editors

string
nullable
isDefault

Whether this is the block’s default variant

boolean
allowedSources

Source kinds this variant supports; null = all

Array<string>
nullable
Example
[
"section",
"query"
]
breakpoints

Breakpoints this variant can be used on; null = all

Array<string>
nullable
Allowed values: lg md xs
Example
[
"xs",
"md"
]
constraints

Constraints on block settings for this variant

object
limit
object
min
integer
max
integer
default
integer
Example
{
"limit": {
"min": 2,
"max": 13,
"default": 7
}
}
options

JSON Schema of this variant’s options (PageLayoutBlock.variantOptions)

object
key
additional properties
any
Example
{
"type": "object",
"properties": {
"leadBadge": {
"title": "Lead badge",
"type": "string"
}
},
"additionalProperties": false
}
Example
{
"type": "content_list",
"label": "Content list",
"kinds": [
"front",
"landing",
"category_template",
"article_template",
"author_template",
"keyword_template"
],
"container": false,
"childTypes": [],
"sourceKinds": [
"section",
"query",
"mostread",
"mostcommented"
],
"settings": {
"type": "object",
"required": [
"source"
],
"properties": {
"source": {
"type": "object"
}
}
},
"defaultVariant": "thumb_list",
"variants": [
{
"key": "thumb_list",
"label": "Thumbnail list",
"description": "Vertical list with a small image beside each headline.",
"isDefault": true,
"allowedSources": null,
"breakpoints": null,
"constraints": {
"limit": {
"min": 1,
"max": 20,
"default": 5
}
},
"options": {
"type": "object",
"properties": {
"showByline": {
"title": "Show byline",
"type": "boolean"
}
},
"additionalProperties": false
}
}
]
}

Page builder is not enabled