Each block type stores its settings as typed fields. This page lists the fields of every built-in block, with the type, limits and default. Nested fields use dots, for example items.question. Blocks are described in Blocks and rendering.
coullworks.banner-bleed block fields#
| Field | Type | What it does | Limits and default |
|---|
image_desktop | media | The banner image for wide screens. A path on the blog's image disk. | |
image_mobile | media | An optional second banner image for narrow screens. A path on the blog's image disk. | |
alt | text | Alternative text for the image, read by screen readers. Not needed when Decorative is on. | Max 255. |
decorative | toggle | Marks the image as purely decorative. An empty alternative text is stored and screen readers skip it. | Default false. |
video_bg | media | An optional background video. A path on the blog's image disk. | |
overlay_color | text | The colour laid over the banner, as a CSS colour value. | Max 32. |
overlay_opacity | number | How strong the overlay is, from 0 (none) to 100. | Min 0, max 100. Default 0. |
heading | text | The banner heading. | Max 255. |
text | rich-inline | Short text shown under the banner heading. | |
cta_label | text | The label of the banner button. | Max 64. |
cta_link | link | Where the banner button goes: an address, a post, a category or a tag. | |
min_height | number | The least height of the banner, in pixels. | Min 0, max 4000. |
alignment | select | Which side the banner text sits on: left, centre or right. Options: left, center, right. | Required. Default left. |
coullworks.banner-constrained block fields#
| Field | Type | What it does | Limits and default |
|---|
image_desktop | media | The banner image for wide screens. A path on the blog's image disk. | |
image_mobile | media | An optional second banner image for narrow screens. A path on the blog's image disk. | |
alt | text | Alternative text for the image, read by screen readers. Not needed when Decorative is on. | Max 255. |
decorative | toggle | Marks the image as purely decorative. An empty alternative text is stored and screen readers skip it. | Default false. |
video_bg | media | An optional background video. A path on the blog's image disk. | |
overlay_color | text | The colour laid over the banner, as a CSS colour value. | Max 32. |
overlay_opacity | number | How strong the overlay is, from 0 (none) to 100. | Min 0, max 100. Default 0. |
heading | text | The banner heading. | Max 255. |
text | rich-inline | Short text shown under the banner heading. | |
cta_label | text | The label of the banner button. | Max 64. |
cta_link | link | Where the banner button goes: an address, a post, a category or a tag. | |
min_height | number | The least height of the banner, in pixels. | Min 0, max 4000. |
alignment | select | Which side the banner text sits on: left, centre or right. Options: left, center, right. | Required. Default left. |
coullworks.banner-full block fields#
| Field | Type | What it does | Limits and default |
|---|
image_desktop | media | The banner image for wide screens. A path on the blog's image disk. | |
image_mobile | media | An optional second banner image for narrow screens. A path on the blog's image disk. | |
alt | text | Alternative text for the image, read by screen readers. Not needed when Decorative is on. | Max 255. |
decorative | toggle | Marks the image as purely decorative. An empty alternative text is stored and screen readers skip it. | Default false. |
video_bg | media | An optional background video. A path on the blog's image disk. | |
overlay_color | text | The colour laid over the banner, as a CSS colour value. | Max 32. |
overlay_opacity | number | How strong the overlay is, from 0 (none) to 100. | Min 0, max 100. Default 0. |
heading | text | The banner heading. | Max 255. |
text | rich-inline | Short text shown under the banner heading. | |
cta_label | text | The label of the banner button. | Max 64. |
cta_link | link | Where the banner button goes: an address, a post, a category or a tag. | |
min_height | number | The least height of the banner, in pixels. | Min 0, max 4000. |
alignment | select | Which side the banner text sits on: left, centre or right. Options: left, center, right. | Required. Default left. |
coullworks.callout block fields#
| Field | Type | What it does | Limits and default |
|---|
variant | select | The callout style. Options: info, tip, warning, note. | Required. |
title | text | An optional heading for the callout. | Max 255. |
body | rich | The body text. | Required. |
coullworks.code block fields#
| Field | Type | What it does | Limits and default |
|---|
language | select | The language used for syntax highlighting. Options: php, js, ts, jsx, tsx, json, bash, html, css, scss, less, sql, xml, yaml, python, graphql, diff, twig, plaintext. | Required. Default plaintext. |
filename | text | An optional file name shown above the code. | Max 255. |
code | code | The code itself. | Max 200000, required. |
line_numbers | toggle | Shows line numbers. They are not copied with the code. | Default false. |
highlight_lines | text | Lines to mark, for example 2-3,5. | Max 120. |
wrap | toggle | Wraps long lines instead of scrolling sideways. | Default false. |
coullworks.columns block fields#
| Field | Type | What it does | Limits and default |
|---|
columns | columns | The columns, between 2 and 4, each holding its own nested blocks. | Min 2, max 4, required. |
columns.blocks | blocks | The blocks inside one column (at most 20). | Max 20, required. |
coullworks.cta block fields#
| Field | Type | What it does | Limits and default |
|---|
style | select | Shows the call to action as a button or as a card. Options: button, card. | Required. Default button. |
title | text | The call to action headline. | Max 255, required. |
text | text | Supporting text under the headline. | Max 500. |
link | link | Where the call to action goes: an address, a post, a category or a tag. | Required. |
media | media | An optional image for the call to action. A path on the blog's image disk. | |
coullworks.divider block fields#
| Field | Type | What it does | Limits and default |
|---|
style | select | A line, a row of dots, or empty space. Options: line, dots, space. | Required. Default line. |
coullworks.embed block fields#
| Field | Type | What it does | Limits and default |
|---|
url | text | The address to embed or play. | Max 2048, required. |
title | text | The title of the embedded frame. When empty it reads Embedded <provider> content. | Max 150. |
coullworks.faq block fields#
| Field | Type | What it does | Limits and default |
|---|
items | list | The entries of the block. | Min 1, required. |
items.question | text | The question. | Max 500, required. |
items.answer | rich | The answer. | Required. |
open_first | toggle | Opens the first question when the page loads. | Default false. |
| Field | Type | What it does | Limits and default |
|---|
media | media | The figure image. A path on the blog's image disk. | Required. |
mobile_media | media | A second image shown below 768 pixels wide. One alternative text serves both images. A path on the blog's image disk. | |
alt | text | Alternative text for the image, read by screen readers. Not needed when Decorative is on. | Max 255. |
decorative | toggle | Marks the image as purely decorative. An empty alternative text is stored and screen readers skip it. | Default false. |
caption | rich-inline | A caption shown with the item. | |
credit_text | text | The credit line for the image. | Max 255. |
credit_url | text | A link for the credit. | Max 2048. |
alignment | select | How wide the figure runs: text width, wide or full. Options: text, wide, full. | Required. Default text. |
lightbox | toggle | Lets the visitor open the image larger. | Default false. |
coullworks.gallery block fields#
| Field | Type | What it does | Limits and default |
|---|
images | list | The gallery images. | Min 1, required. |
images.media | media | The image. A path on the blog's image disk. | Required. |
images.alt | text | Alternative text for the image. | Max 255. |
images.decorative | toggle | Marks the image as purely decorative. | Default false. |
images.caption | text | A caption for the image. | Max 255. |
layout | select | How the images are arranged. Options: single, 2-up, 3-up, masonry. | Required. Default 3-up. |
lightbox | toggle | Lets the visitor open the image larger. | Default false. |
coullworks.heading block fields#
| Field | Type | What it does | Limits and default |
|---|
text | text | The heading text. | Max 255, required. |
level | select | The heading level. Options: h2, h3, h4. | Required. Default h2. |
anchor | text | The anchor name used to link to the heading. | Max 120. |
coullworks.html block fields#
| Field | Type | What it does | Limits and default |
|---|
html | code | The raw HTML. It is sanitised before it is shown. Options: sanitise. | Max 200000, required. |
coullworks.image block fields#
| Field | Type | What it does | Limits and default |
|---|
media | media | The image. A path on the blog's image disk. | Required. |
alt | text | Alternative text for the image, read by screen readers. Not needed when Decorative is on. | Max 300, only shown when decorative = False. |
decorative | toggle | Marks the image as purely decorative. An empty alternative text is stored and screen readers skip it. | Default false. |
title | text | An optional title attribute for the image. | Max 300. |
coullworks.quote block fields#
| Field | Type | What it does | Limits and default |
|---|
quote | textarea | The quotation. | Max 5000, required. |
citation | text | Who said it. | Max 255. |
citation_url | text | A link for the source of the quotation. | Max 2048. |
coullworks.section block fields#
| Field | Type | What it does | Limits and default |
|---|
width | select | How wide the section runs. Options: narrow, text, wide, bleed. | Required. Default text. |
background_color | text | A background colour for the section, as a CSS colour value. | Max 32. |
background | media | A background image for the section. A path on the blog's image disk. | |
padding | select | How much space surrounds the section's content. Options: none, sm, md, lg. | Required. Default md. |
children | blocks | The blocks inside the section. Only leaf blocks are allowed (no columns or sections). | Nested builder (leaf blocks only). |
coullworks.table block fields#
| Field | Type | What it does | Limits and default |
|---|
header_row | toggle | Treats the first row as a header row. | Default false. |
header_column | toggle | Treats the first column as row headers. | Default false. |
caption | text | A caption for the table. | Max 255. |
striped | toggle | Shades alternate rows. | Default false. |
rows | list | The table rows and cells. | Min 1, required. |
coullworks.takeaways block fields#
| Field | Type | What it does | Limits and default |
|---|
title | text | A heading for the takeaways box. | Max 255. |
items | list | The entries of the block. | Min 1, max 20, required. |
items.text | text | The takeaway text. | Max 500, required. |
coullworks.text block fields#
| Field | Type | What it does | Limits and default |
|---|
body | rich | The body text. | Required. |
coullworks.toc block fields#
| Field | Type | What it does | Limits and default |
|---|
levels | select | Which heading levels the table of contents lists. Options: h2, h2-h3. | Required. Default h2-h3. |
title | text | A heading for the table of contents. | Max 255. |
coullworks.video block fields#
| Field | Type | What it does | Limits and default |
|---|
provider | select | Where the video comes from. Options: upload, youtube, vimeo. | Required. |
url | text | The address to embed or play. | Max 2048. |
media | media | The video file for uploads. A path on the blog's image disk. | |
poster | media | The still image shown before playback. A path on the blog's image disk. | |
no_poster | toggle | Shows no poster image. | Default false. |
title | text | A title for the video, used for accessibility. | Max 255, required. |
caption | text | A caption shown with the video. | Max 255. |
captions_track | media | A captions file for the video. | |
aspect | select | The aspect ratio of the video frame. Options: 16:9, 4:3, 1:1, 21:9, 9:16. | Required. Default 16:9. |
coullworks.products block fields#
| Field | Type | What it does | Limits and default |
|---|
layout | select | Shows the products as a grid or a carousel. Options: carousel, grid. | Default grid. |
count | number | How many products to show. | Min 1, max 24, required. Default 4. |
source | select | Where the products come from: hand-made cards, a collection, or a rule your application provides. When absent it is derived: cards if there are any, otherwise the collection when one is named. Options: cards, collection, rule. | Value derived when absent (cards if any cards, else collection if collection_key set); editor hides "rule" without a ProductRuleProvider. |
cards | list | Hand-made product cards. | |
cards.title | text | The card title. | Max 255, required. |
cards.link | link | Where the card goes. | Required. |
cards.media | media | The card image. A path on the blog's image disk. | |
cards.alt | text | Alternative text for the card image. | Max 255. |
cards.decorative | toggle | Marks the card image as decorative. | Default false. |
cards.price_text | text | The price text shown on the card. | Max 64. |
cards.product_ref | text | A reference to a product in your catalogue, resolved by your ProductProvider. | Max 191. |
collection_key | text | The key of a collection in your catalogue, resolved by your ProductProvider. | Max 191. |
rule_key | text | The key of a rule your ProductRuleProvider offers. | Max 64. |
Block registry and editor#
- Custom block types: Register app BlockType classes via coullworks-blog.blocks.custom (docs/extending-blocks.md); example PricingTable in workbench/app/Blocks.
- Disabled block types: coullworks-blog.blocks.disabled hides types from pickers; stored content of a disabled type still validates, indexes and renders.
- Block versions and upgraders: Old stored versions are upgraded in memory on read; cwb:blocks:upgrade persists them.
- Block reference index: Media, product and link references derived from blocks (tables block_media_refs, block_product_refs, block_link_refs); cwb:blocks:reindex rebuilds them; broken links shown on the dashboard widget.
- Block JSON schema: GET api/blog/v1/schema/blocks returns the JSON Schema of every block type.