---
title: "Field Prefixing"
manual: "Content Blocks"
version: "main"
permalink: "https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:api-prefixing@main"
source: "API/Prefixing/Index.rst"
rendered: "2026-09-22T14:15:39+00:00"
---

# Field Prefixing {#api-prefixing}

Content Blocks comes with a built-in prefixing mechanism for your custom fields.
Whenever you create a new field, the identifier will be prefixed internally
with a combination of the `name`. This is important in order to avoid
collisions with other Content Blocks that use the same identifier for their
field. Every new field you create will add a new database column to the table.
If you want to avoid creating new database columns, see how you can
[reuse and share](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:cb-reuse-existing-cb-fields@main) fields between different
Content Blocks.

## Configure prefixing behavior {#configure-prefixing-behavior}

By default, prefixing is enabled. In case you don't want prefixing at all, you
can either disable it globally with [prefixFields](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:confval-root-prefixfields@main)
or on a per field level with [prefixField](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:confval-field-types-prefixfield@main).

The default prefix type is `full`. That means the complete `name` is
used as a prefix. All dashes are removed and the slash will be converted to an
underscore:

```none
my-vendor/my-element️ => myvendor_myelement
```

An alternative to the full prefix is the `vendor` prefix. This option can
be set in [prefixType](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:confval-root-prefixtype@main). This does also work on a
per field level. By doing so, only the `vendor` part of `name` is used as
a prefix. This is especially useful if you want all your fields to have the same
prefix. In case you just want to have a static prefix, which differs from your
vendor, you can set a fixed vendor prefix with [vendorPrefix](https://docs.typo3.org/permalink/friendsoftypo3/content-blocks:confval-root-vendorprefix@main).

## Examples {#examples}

```yaml
# This will prefix all your fields with "myvendor_myelement"
name: my-vendor/my-element
prefixFields: true
prefixType: full
```

```yaml
# This will disable prefixing altogether
name: my-vendor/my-element
prefixFields: false
```

```yaml
# This will prefix all your fields with "myvendor"
name: my-vendor/my-element
prefixFields: true
prefixType: vendor
```

```yaml
# This will prefix all your fields with "tx_foo"
name: my-vendor/my-element
prefixFields: true
prefixType: vendor
vendorPrefix: tx_foo
```

```yaml
# This will disable prefixing only for the field "my_field"
name: my-vendor/my-element
prefixFields: true
prefixType: full
fields:
    - identifier: my_field
      type: Text
      prefixField: false
```
