Search by

netzbewegung / nb-headless-content-blocks

steffenmaechtelnetzbewegung

Connects together EXT:headless and EXT:content_blocks

Package info

github.com/Netzbewegung-Backend/nb_headless_content_blocks

Type:typo3-cms-extension

pkg:composer/netzbewegung/nb-headless-content-blocks

Statistics

Installs: 4 260

Dependents: 1

Suggesters: 0

Stars: 4

Open Issues: 4

0.1.0 2026-09-04 19:17 UTC

README

TYPO3 compatibility TYPO3 compatibility

EXT:nb_headless_content_blocks

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.

Documentation: docs/README.md — start with Getting started. Changes are tracked in the CHANGELOG.

What it does

  • 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.yaml in 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-json processor.

Installation

composer require netzbewegung/nb_headless_content_blocks

Include the Site Set "Headless Content Blocks" in your site's config.yaml:

sets:
  - nb-headless-content-blocks/headless-content-blocks

You are ready to go — the walkthrough with an example response lives in Getting started.

Development

Setup, tests and contribution rules live in CONTRIBUTING.md; machine-oriented onboarding (testing gotchas, TYPO3 version switching) in AGENTS.md.

License

GPL-2.0-or-later