PHPackages                             typo3-contentblocks/contentblocks-reg-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. typo3-contentblocks/contentblocks-reg-api

ActiveTypo3-cms-extension[Utility &amp; Helpers](/categories/utility)

typo3-contentblocks/contentblocks-reg-api
=========================================

This API provides an easy and reliable way to register content blocks as standalone packages.

v3.0.5(3y ago)204.9k7[20 issues](https://github.com/TYPO3-Initiatives/content-block-registration-api/issues)[2 PRs](https://github.com/TYPO3-Initiatives/content-block-registration-api/pulls)GPL-2.0-or-laterPHPPHP ^7.2 || ^8.0

Since Mar 19Pushed 2y ago10 watchersCompare

[ Source](https://github.com/TYPO3-Initiatives/content-block-registration-api)[ Packagist](https://packagist.org/packages/typo3-contentblocks/contentblocks-reg-api)[ RSS](/packages/typo3-contentblocks-contentblocks-reg-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (49)Versions (12)Used By (0)

[![CGL & unit tests](https://github.com/TYPO3-Initiatives/content-block-registration-api/workflows/CGL%20&%20unit%20tests/badge.svg?branch=master)](https://github.com/TYPO3-Initiatives/content-block-registration-api/actions)[![Latest Stable Version](https://camo.githubusercontent.com/df74fd28704bc4de5cb5e45beb8ba0f01bc45913375a9a8d97611123328c5161/68747470733a2f2f706f7365722e707567782e6f72672f7479706f332d636f6e74656e74626c6f636b732f636f6e74656e74626c6f636b732d7265672d6170692f76)](//packagist.org/packages/typo3-contentblocks/contentblocks-reg-api)[![Latest Unstable Version](https://camo.githubusercontent.com/2631606cf29522ef318ae502c867e52bc76e66a513764e886a2330f2f389c455/68747470733a2f2f706f7365722e707567782e6f72672f7479706f332d636f6e74656e74626c6f636b732f636f6e74656e74626c6f636b732d7265672d6170692f762f756e737461626c65)](//packagist.org/packages/typo3-contentblocks/contentblocks-reg-api)[![License](https://camo.githubusercontent.com/4e43aa96809da9d07698b91b1da2a02d0fa29e942a30948b6eb6e7bd7645cf96/68747470733a2f2f706f7365722e707567782e6f72672f7479706f332d636f6e74656e74626c6f636b732f636f6e74656e74626c6f636b732d7265672d6170692f6c6963656e7365)](//packagist.org/packages/typo3-contentblocks/contentblocks-reg-api)

Registration API for Content Blocks
===================================

[](#registration-api-for-content-blocks)

⚠️ Attention: This is the API for TYPO3 v11 ⚠️
----------------------------------------------

[](#️-attention-this-is-the-api-for-typo3-v11-️)

For **TYPO3 v12**, you can find the [github repository here](https://github.com/nhovratov/content-blocks) or on [TER here](https://extensions.typo3.org/extension/content_blocks/).

Introduction
------------

[](#introduction)

This API provides an easy and reliable way to register content blocks (composer packages). Follow this README for a quick getting started overview. Find the full [Documentation](https://github.com/TYPO3-Initiatives/content-block-registration-api/blob/master/Documentation/Index.rst) inside this repository.

### Status

[](#status)

`beta` - the main concepts are laid out, the data storage method refactored and tested. We welcome your feedback. You can reach us in the TYPO3 Slack `#cig-structuredcontent` ❤️.

Installation
------------

[](#installation)

### For developing on this API

[](#for-developing-on-this-api)

This will set up a TYPO3 v10 with ddev and install the API extension.

#### Requirements

[](#requirements)

- ddev

1. Clone this repository
2. Run `ddev launch /typo3`

The TYPO3 backend user is "admin", password "adminadmin".

It includes example Content Blocks in a local composer repository that are installed by default.

### For using Content Blocks

[](#for-using-content-blocks)

#### Requirements

[](#requirements-1)

- TYPO3 v10+
- In TYPO3 v10, backend previews require the [Fluid based Page module](https://docs.typo3.org/c/typo3/cms-core/master/en-us/Changelog/10.3/Feature-90348-NewFluid-basedReplacementForPageLayoutView.html) to be enabled.

The API required to use content blocks consists of 2 composer packages: an API extension and a composer plugin.

#### Installation steps

[](#installation-steps)

1. `composer req typo3-contentblocks/contentblocks-reg-api`
2. Activate the extension `contentblocks_reg_api`
3. Add new database fields: (Backend) `Maintenance` › `Analyze Database Structure`

### Getting/Creating new content blocks

[](#gettingcreating-new-content-blocks)

#### Via composer

[](#via-composer)

[This is an example repo](https://github.com/TYPO3-Initiatives/content-block-examples) with a content block

```
composer req typo3-contentblocks/call-to-action:dev-master
```

For using custom content blocks in your project we recommend a [local "path" composer repository](https://getcomposer.org/doc/05-repositories.md#path).

#### Wizard

[](#wizard)

There is a wizard module that kickstarts Content Blocks for you.

#### Create them locally

[](#create-them-locally)

You can also add a Content Block directory manually to `typo3conf/contentBlocks`.

Usage
-----

[](#usage)

Processes that happen during content block registration
-------------------------------------------------------

[](#processes-that-happen-during-content-block-registration)

### Detecting a content block

[](#detecting-a-content-block)

The detection of content blocks depends on the composer package type. The custom composer installer then retrieves all packages, which are of type `typo3-contentblock`.

### Validation

[](#validation)

Following aspects are mandatory for a content block to be validated successfully:

- An icon for the content block named "ContentBlockIcon" hast to be present in the package root and of type SVG/PNG/GIF
- The file `EditorInterface.yaml` has to be present in the package root and valid
- The backend language file `Default.xml` or `EditorInterface.xlf` has to be present in the `src/Language` folder of the package
- The file `EditorPreview.html ` has to be present in the `src` folder of the package

### Location

[](#location)

Content blocks are stored in or symlinked to `typo3conf/contentBlocks/`.

### Virtual generation of TCA

[](#virtual-generation-of-tca)

TCA is virtually generated from the class implementing a content block field type.

### Generation of FlexForm

[](#generation-of-flexform)

Based on the fields defined in the `EditorInterface.yaml` a FlexForm for the editing interface of the content block is generated and stored in `tt_content.content_block`.

### Registration of the content block

[](#registration-of-the-content-block)

- Register icon
- Add TCA entry in CTypes list including the icon
- Add the content block to the NewContentElementWizard
- Add TypoScript to render the content plugin
- Add PageTS for the content block

Extension configuration
-----------------------

[](#extension-configuration)

For some reason it might be necessary to inherit content blocks from your own definition. E. g. if you want to inherit content blocks from lib.contentElement. In that case you can extend the default TypoScript as you need. This is the default Code:

```
lib.contentBlock = FLUIDTEMPLATE
lib.contentBlock {
    layoutRootPaths {
        -5 = EXT:contentblocks_reg_api/Resources/Private/Layouts/
    }

    partialRootPaths {
        0 = EXT:contentblocks_reg_api/Resources/Private/Partials/
    }

    dataProcessing {
        10 = Typo3Contentblocks\ContentblocksRegApi\DataProcessing\CbProcessor
        20 = Typo3Contentblocks\ContentblocksRegApi\DataProcessing\FlexFormProcessor
    }
}
```

**Attention**: If you change the code, you are responsible for that the code is working. Beware of data processing. Your content block won't work without that.

You can inject your code via the extension settings in the install tool. There you can set the default TypoScript to your specific file like `EXT:sitepackage/Configuration/TypoScript/contentBlock.typoscript`.

The second thing in the extension configuration is to enable the frame pallet in the appearance section. This might be a helpful feature if you are using fluid\_styled\_content or bootstrap\_package.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~70 days

Recently: every ~41 days

Total

11

Last Release

1177d ago

Major Versions

v0.1.0 → v1.0.02021-04-28

v1.0.2 → v2.0.02022-04-07

v2.0.0 → v3.0.02022-09-06

PHP version history (3 changes)v0.1.0PHP ^7.2

v2.0.0PHP ^7.2 || ~8.0.0

v3.0.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/95fdcd294651f1b0970313b3bcdd61cc7c3bddf160034d2d5db1c6db3f3c2163?d=identicon)[andrekraus](/maintainers/andrekraus)

![](https://www.gravatar.com/avatar/1594cb51543ffd4c5b91be0c7dfed1e740beb6391a6cb76654d7cdbd13e9be41?d=identicon)[jonaseberle](/maintainers/jonaseberle)

![](https://www.gravatar.com/avatar/238bc9c00277f814b19c712d42f0252c6119f478ca2b5b88a3cf04a6c5c90915?d=identicon)[phvt](/maintainers/phvt)

![](https://www.gravatar.com/avatar/ec256b7b676ec68789af3574a3b3330c4f5563bc7bbaf097fd64850a37470e7c?d=identicon)[typecat](/maintainers/typecat)

---

Top Contributors

[![krausandre](https://avatars.githubusercontent.com/u/42275455?v=4)](https://github.com/krausandre "krausandre (189 commits)")[![jonaseberle](https://avatars.githubusercontent.com/u/1678001?v=4)](https://github.com/jonaseberle "jonaseberle (179 commits)")[![typecat](https://avatars.githubusercontent.com/u/30155820?v=4)](https://github.com/typecat "typecat (155 commits)")[![mcmietz](https://avatars.githubusercontent.com/u/8003340?v=4)](https://github.com/mcmietz "mcmietz (8 commits)")[![pniederlag](https://avatars.githubusercontent.com/u/85458?v=4)](https://github.com/pniederlag "pniederlag (2 commits)")[![nhovratov](https://avatars.githubusercontent.com/u/19343425?v=4)](https://github.com/nhovratov "nhovratov (1 commits)")

---

Tags

typo3-contentblockstypo3Content Blocks

###  Code Quality

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/typo3-contentblocks-contentblocks-reg-api/health.svg)

```
[![Health](https://phpackages.com/badges/typo3-contentblocks-contentblocks-reg-api/health.svg)](https://phpackages.com/packages/typo3-contentblocks-contentblocks-reg-api)
```

###  Alternatives

[in2code/powermail

Powermail is a well-known, editor-friendly, powerful and easy to use mailform extension for TYPO3 with a lots of features

982.5M38](/packages/in2code-powermail)[in2code/powermail_cond

Add conditions (via AJAX) to powermail forms for fields and pages

10530.6k](/packages/in2code-powermail-cond)[jweiland/events2

Events 2 - Create single and recurring events

2062.4k2](/packages/jweiland-events2)[quellenform/t3x-iconpack

Provides an iconpack-registry for custom iconpacks.

1542.7k25](/packages/quellenform-t3x-iconpack)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
