Connects EXT:headless and EXT:content_blocks: it converts Content Block records into JSON-compatible arrays for headless frontends — with a stable, test-frozen JSON contract.
Start with the Getting started tutorial. Changes are tracked in the CHANGELOG.
- Converts every Content Block field type to JSON without extra
configuration: richtext via
parseFunc_RTE, links as{url, target, type, title, config, attr}, files as{id, alt, title, publicUrl}, categories, collections, relations, FlexForms, date times, and more — see the JSON contract. - Field identifiers (not database columns) as JSON keys, alphabetically sorted — stable for frontend consumers.
- Declarative image variants: responsive thumbnails per field via an
optional
headless.yamlin the Content Block, overridable per site via TypoScript — no PHP needed. - Extensible conversion pipeline: register your own normalizers and field value transformers via DI tags.
- Escape hatches: per-block headless.php, sub data processors, and a PSR-14 event (deprecated).
- Support for EXT:container via the
nb-container-jsonprocessor.
composer require netzbewegung/nb-headless-content-blocksInclude the Site Set "Headless Content Blocks" in your site's
config.yaml:
dependencies:
- nb-headless-content-blocks/headless-content-blocksYou are ready to go — verify your first JSON response as shown in the Getting started tutorial.
Setup, tests and contribution rules live in CONTRIBUTING.md; machine-oriented onboarding (testing gotchas, TYPO3 version switching) in AGENTS.md.
GPL-2.0-or-later