| name | typo3-ddev-content-blocks |
| description | Local Content Blocks development with DDEV. Setup, testing, and debugging Content Blocks extensions. |
| version | 1.0.0 |
| typo3_compatibility | 13.0 - 14.x |
| related_skills | ["typo3-ddev","typo3-content-blocks"] |
| triggers | ["ddev content blocks","content blocks local development","content blocks setup"] |
Content Blocks Development with DDEV
Compatibility: TYPO3 v13.x and v14.x
Related Skills:
1. Initial Setup
Install Content Blocks Extension
ddev start
ddev composer require friendsoftypo3/content-blocks
ddev typo3 extension:setup
Project Structure
my-typo3-project/
├── .ddev/
│ └── config.yaml
├── packages/
│ └── my_extension/
│ └── ContentBlocks/
│ ├── ContentElements/
│ │ └── hero/
│ │ ├── config.yaml
│ │ └── templates/
│ └── RecordTypes/
│ └── team-member/
│ └── config.yaml
├── public/
└── composer.json
2. Development Workflow
Create Content Block
ddev typo3 make:content-block myvendor/hero --type=content-element
ddev typo3 make:content-block myvendor/team-member --type=record-type
Cache Management
ddev typo3 cache:flush
ddev typo3 cache:flush -g system
Database Schema Updates
ddev typo3 extension:setup
ddev launch /typo3/install.php
3. Debugging Content Blocks
Enable Debug Mode
return [
'BE' => [
'debug' => true,
],
'FE' => [
'debug' => true,
],
'SYS' => [
'devIPmask' => '*',
'displayErrors' => 1,
'exceptionalErrors' => E_ALL,
],
];
View Generated TCA
ddev typo3 configuration:show TCA.tt_content.types.myvendor_hero
Check Database Columns
ddev mysql -e "DESCRIBE tt_content" | grep myvendor
ddev mysql -e "DESCRIBE tx_myvendor_team_member"
4. Testing Content Blocks
Functional Test Setup
ddev composer require --dev typo3/testing-framework
ddev exec vendor/bin/phpunit -c Build/phpunit-functional.xml
Test Fixtures
<dataset>
<pages>
<uid>1</uid>
<pid>0</pid>
<title>Test Page</title>
</pages>
<tt_content>
<uid>1</uid>
<pid>1</pid>
<CType>myvendor_hero</CType>
<header>Test Hero</header>
<myvendor_hero_subheadline>Test Subheadline</myvendor_hero_subheadline>
</tt_content>
</dataset>
5. DDEV Commands for Content Blocks
Custom DDEV Command
vendor/bin/typo3 cache:flush
vendor/bin/typo3 extension:setup
echo "Content Blocks cache rebuilt!"
chmod +x .ddev/commands/web/cb-flush
ddev cb-flush
6. Common Issues
| Issue | Solution |
|---|
| Content Block not appearing | Run ddev typo3 cache:flush |
| Database columns missing | Run ddev typo3 extension:setup |
| CType not registered | Check config.yaml syntax |
| Template not found | Verify templates/frontend.html path |
References
Credits & Attribution
This skill is part of the webconsulting.at TYPO3 skills collection.