Skip to content
Back to skills

2501 Skill Content Blocks 284b8860

ASecurity

Documenting Content Blocks extensions. RST patterns for config.yaml, templates, and usage examples.

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

Security analysis

A100/100

Scanned October 11, 2026

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

Installs into .claude/skills of the current project.

Are you the author of 2501 Skill Content Blocks 284b8860?

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

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

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

SKILL.md
---
name: typo3-docs-content-blocks
description: Documenting Content Blocks extensions. RST patterns for config.yaml, templates, and usage examples.
version: 1.0.0
typo3_compatibility: "13.0 - 14.x"
related_skills:
  - typo3-docs
  - typo3-content-blocks
triggers:
  - document content blocks
  - content blocks documentation
---

# Documenting Content Blocks

> **Compatibility:** TYPO3 v13.x and v14.x
> 
> **Related Skills:**
> - [typo3-docs](./SKILL.md) - Main documentation guide
> - [typo3-content-blocks](../typo3-content-blocks/SKILL.md) - Content Blocks development

---

## 1. Content Block Reference

```rst
Content Elements
================

Hero Banner
-----------

The hero banner element displays a full-width header section.

**CType:** ``myvendor_hero``

**Fields:**

.. confval:: header
   :type: string
   :required: true

   Main headline of the hero section.

.. confval:: subheadline
   :type: string

   Optional subheadline text.

.. confval:: image
   :type: file
   :maxitems: 1

   Background image for the hero.

**Example:**

.. code-block:: yaml
   :caption: ContentBlocks/ContentElements/hero/config.yaml

   name: myvendor/hero
   fields:
     - identifier: header
       useExistingField: true
     - identifier: subheadline
       type: Text
     - identifier: image
       type: File
       maxitems: 1
```

---

## 2. Template Documentation

```rst
Templates
=========

Frontend Template
-----------------

.. code-block:: html
   :caption: ContentBlocks/ContentElements/hero/templates/frontend.html

   <section class="hero">
       <f:if condition="{data.image}">
           <f:for each="{data.image}" as="img">
               <f:image image="{img}" class="hero-bg"/>
           </f:for>
       </f:if>
       <h1>{data.header}</h1>
       <f:if condition="{data.subheadline}">
           <p>{data.subheadline}</p>
       </f:if>
   </section>

Template Variables
------------------

All Content Blocks templates receive:

- ``{data}`` - The content element record with all fields
- ``{data.uid}`` - The UID of the element
- ``{data.pid}`` - The page ID
- ``{data.fieldname}`` - Each custom field value
```

---

## 3. Migration Documentation

```rst
Migration from Classic TCA
==========================

If migrating from a classic extension, update your code:

**Before (Classic):**

.. code-block:: php

   $data['CType'] = 'myext_hero';
   $data['tx_myext_subheadline'] = 'Text';

**After (Content Blocks):**

.. code-block:: php

   $data['CType'] = 'myvendor_hero';
   $data['myvendor_hero_subheadline'] = 'Text';

See :ref:`typo3-content-blocks/SKILL-MIGRATION` for detailed migration steps.
```

---

## 4. Record Type Documentation

```rst
Record Types
============

Team Member
-----------

The team member record stores information about team members.

**Table:** ``tx_myvendor_team_member``

.. confval:: name
   :type: string
   :required: true

   Full name of the team member.

.. confval:: position
   :type: string

   Job title or position.

.. confval:: photo
   :type: file
   :maxitems: 1

   Profile photo.
```

---

## References

- [typo3-docs SKILL.md](./SKILL.md)
- [typo3-content-blocks SKILL.md](../typo3-content-blocks/SKILL.md)
- [TYPO3 How to Document](https://docs.typo3.org/m/typo3/docs-how-to-document/main/en-us/)

---

## 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…