Skip to content
Back to skills

2501 Skill Content Blocks 28603bbe

ASecurity

Converting extensions to Content Blocks during upgrade. Step-by-step migration from classic TCA.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
developmentgophpsqldatabasefrontendbackend

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2501-skill-content-blocks_28603bbe --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2501 Skill Content Blocks 28603bbe?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2501 Skill Content Blocks 28603bbe
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2501-skill-content-blocks-28603bbe/badge)](https://www.skillsdirectory.com/skills/tools-only-2501-skill-content-blocks-28603bbe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: typo3-extension-upgrade-content-blocks
description: Converting extensions to Content Blocks during upgrade. Step-by-step migration from classic TCA.
version: 1.0.0
typo3_compatibility: "13.0 - 14.x"
related_skills:
  - typo3-extension-upgrade
  - typo3-content-blocks
triggers:
  - extension content blocks
  - convert extension to content blocks
---

# Extension Upgrade with Content Blocks

> **Compatibility:** TYPO3 v13.x and v14.x
> 
> **Related Skills:**
> - [typo3-extension-upgrade](./SKILL.md) - Main extension upgrade guide
> - [typo3-content-blocks SKILL-MIGRATION](../typo3-content-blocks/SKILL-MIGRATION.md) - Migration guide

---

## 1. Assessment: Should You Convert?

### Good Candidates for Content Blocks

- Simple content elements (hero, card, teaser)
- Record types without complex business logic
- Elements with straightforward field structures

### Keep as Classic

- Complex Extbase extensions with controllers
- Elements with custom DataProcessors
- Heavy backend module integration

---

## 2. Upgrade + Convert Workflow

```
┌─────────────────────────────────────────┐
│  1. Upgrade TYPO3 version first         │
├─────────────────────────────────────────┤
│  2. Stabilize extension on new version  │
├─────────────────────────────────────────┤
│  3. Install Content Blocks extension    │
├─────────────────────────────────────────┤
│  4. Convert elements one at a time      │
├─────────────────────────────────────────┤
│  5. Run data migration                  │
├─────────────────────────────────────────┤
│  6. Remove old TCA/SQL                  │
└─────────────────────────────────────────┘
```

---

## 3. Quick Conversion Example

### Before (Classic)

```
packages/my_ext/
├── Configuration/
│   ├── TCA/
│   │   └── Overrides/
│   │       └── tt_content.php
│   └── TypoScript/
│       └── setup.typoscript
├── Resources/
│   └── Private/
│       └── Templates/
│           └── Hero.html
└── ext_tables.sql
```

### After (Content Blocks)

```
packages/my_ext/
└── ContentBlocks/
    └── ContentElements/
        └── hero/
            ├── config.yaml
            └── templates/
                └── frontend.html
```

---

## 4. Migration Script Template

```php
<?php

declare(strict_types=1);

namespace Vendor\MyExtension\Command;

use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Database\ConnectionPool;

#[AsCommand(name: 'myext:migrate-to-content-blocks')]
final class MigrateCommand extends Command
{
    private const MIGRATIONS = [
        ['old_ctype' => 'myext_hero', 'new_ctype' => 'myvendor_hero'],
        ['old_ctype' => 'myext_card', 'new_ctype' => 'myvendor_card'],
    ];

    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $connection = GeneralUtility::makeInstance(ConnectionPool::class)
            ->getConnectionForTable('tt_content');

        foreach (self::MIGRATIONS as $migration) {
            $count = $connection->update(
                'tt_content',
                ['CType' => $migration['new_ctype']],
                ['CType' => $migration['old_ctype']]
            );
            $output->writeln("Migrated {$count} records: {$migration['old_ctype']} → {$migration['new_ctype']}");
        }

        return Command::SUCCESS;
    }
}
```

---

## 5. Files to Remove After Migration

| File | Reason |
|------|--------|
| `Configuration/TCA/Overrides/tt_content.php` | Replaced by config.yaml |
| `ext_tables.sql` (migrated columns) | Auto-generated |
| `Resources/Private/Templates/ContentElements/` | Moved to ContentBlocks |
| `Configuration/TypoScript/` (rendering) | Auto-registered |

---

## References

- [typo3-extension-upgrade SKILL.md](./SKILL.md)
- [typo3-content-blocks SKILL-MIGRATION](../typo3-content-blocks/SKILL-MIGRATION.md)

---

## Credits & Attribution

This skill is part of the webconsulting.at TYPO3 skills collection.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.