TYPO3 Documentation
TCA Reference
Options
Give feedback View source View as Markdown How to edit Edit on GitHub

TCA Reference

About table configuration

  • Introduction
  • Examples
    • About the examples
    • How to use the styleguide extension
  • Best practices
    • Common fields
    • Language fields

Reference

  • Field definitions (columns)
    • Display conditions in TCA columns
    • Examples
  • Field types (config > type)
    • Properties in depth
      • itemsProcFunc
      • MM
      • fieldControl
        • addRecord
        • editPopup
        • listModule
        • resetSelection
      • fieldInformation
        • tcaDescription
      • fieldWizard
        • defaultLanguageDifferences
        • localizationStateSelector
        • otherLanguageContent
    • Category
      • Examples
    • Checkboxes
      • Default checkbox
      • Toggle checkbox
      • Labeled toggle checkbox
      • Examples
    • Color
    • Datetime
    • Email
    • File
    • FlexForm field
      • About the data structure
      • FlexForm syntax
      • Examples
    • Folder
    • Group fields
      • Examples
      • Stored data values
    • Image manipulation
    • IRRE / inline
      • Examples
    • Input
    • Json
    • Language fields
      • Migration
      • History
    • Link
    • The none field
    • Number
    • Pass through / virtual field
    • Password
      • Password policy examples
      • Password generator examples
    • Radio buttons
    • Select fields
      • selectSingle
      • Select multiple values (selectSingleBox)
      • selectCheckBox
        • selectCheckBox and type check fields compared
      • selectMultipleSideBySide
        • Examples
      • selectTree
      • Property details
        • Item group API methods
    • Slugs / URL parts
    • Text areas & RTE
      • text (multiline)
      • Rich text editor (RTE)
      • belayoutwizard
      • codeEditor (previously "t3editor")
      • textTable
    • Custom inputs (user)
    • Uuid
  • Table properties (ctrl)
    • Auto-created columns
    • Enabling columns
    • Examples
  • Backend display (interface)
  • Grouping fields (palettes)
  • Record types
    • Subtype migration
    • tt_content system fields

Appendix

  • Sitemap

Options

Give feedback View source View as Markdown How to edit Edit on GitHub
  1. TCA Reference
  2. Field types (config > type)
  3. Link
Give feedback Markdown Edit on GitHub

Link 

New in version 13.0

When using the link type, TYPO3 takes care of generating the according database field. A developer does not need to define this field in an extension's ext_tables.sql file.

The TCA type link should be used to input values representing typolinks.

The according database field is generated automatically.

Table of contents:

  • Example: A basic link field
  • Properties of the TCA column type link
  • Create an URL

Example: A basic link field 

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!

Properties of the TCA column type link 

Name Type Scope
allowedTypes
array of keywords Display / Proc.
behaviour
allowLanguageSynchronization
boolean Proc.
appearance
array Display
allowedOptions
array
allowedFileExtensions
array
browserTitle
string, LLL
enableBrowser
boolean
autocomplete
boolean Display
default
string Display / Proc.
fieldControl
fieldInformation
fieldWizard
defaultLanguageDifferences
array
localizationStateSelector
array
otherLanguageContent
array
mode
string (keywords) Display
nullable
boolean Proc.
placeholder
string Display
readOnly
boolean Display
required
boolean Display / Proc.
search
array Search
pidonly
boolean
case
boolean
andWhere
string
size
integer Display
valuePicker
array Display
allowedTypes
Type
array of keywords
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['allowedTypes']
Scope
Display / Proc.
page
Links to internal pages
url
Links to external pages
file
Links to a file
folder
Links to a folder
email
Creates an email link
telephone
Creates a phone link
record

Enables any record link handler that is defined in the LinkHandler API. To enable only a specific custom LinkHandler, add the defined identifier instead.

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
behaviour
allowLanguageSynchronization
Type
boolean
Default
false
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['behaviour']['allowLanguageSynchronization']
Scope
Proc.

Allows an editor to select in a localized record whether the value is copied over from default or source language record, or if the field has an own value in the localization. If set to true and if the table supports localization and if a localized record is edited, this setting enables FieldWizard LocalizationStateSelector: Two or three radio buttons shown below the field link. The state of this is stored in a json encoded array in the database table called l10n_state. It tells the DataHandler which fields of the localization records should be kept in sync if the underlying default or source record changes.

EXT:my_extension/Configuration/TCA/Overrides/tx_myextension_mytable.php
<?php

defined('TYPO3') or die();

$GLOBALS['TCA']['tx_myextension_mytable']['columns']['my_link']['config']
  ['behaviour']['allowLanguageSynchronization'] = true;
Copied!
appearance
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']
Scope
Display

Has information about the appearance, namely:

allowedOptions
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']['allowedOptions']

Display certain options in the link browser. To allow all options in the Link Browser, skip this configuration or set it to ['*'] . To deny all options in the Link Browser, set this configuration to [] (empty array ).

class
Custom CSS classes for the link
params
Additional link parameters
target
Either empty, _top or _blank
title
The title attribute of the link
rel
The link relationship. Only available for RTE enabled fields and if buttons.link.relAttribute.enabled is enabled in the RTE YAML configuration.
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!

For custom email links, the options can be restricted:

body
The body of an email can be pre-filled.
cc
The "cc" field can be pre-filled.
bcc:
The "bcc" field can be pre-filled.
subject:
The subject of an email can be pre-filled.
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
allowedFileExtensions
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']['allowedFileExtensions']

An array of allowed file extensions. To allow all extensions, skip this configuration or set it to ['*'] . It's not possible to deny all extensions.

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
browserTitle
Type
string, LLL
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']['browserTitle']

Allows to set a different title attribute for the Link Browser icon, defaults to Link.

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
enableBrowser
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']['enableBrowser']

The Link Browser is enabled by default. To disable the Link Browser altogether, set this option to false .

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
autocomplete
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['autocomplete']
Scope
Display

Controls the autocomplete attribute of a given link field. If set to true (default false), adds attribute autocomplete="on" to the email input field allowing browser auto filling the field:

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
default
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['default']
Scope
Display / Proc.

Default value set if a new record is created.

fieldControl

For details see fieldControl.

fieldInformation

For details see fieldInformation.

fieldWizard
defaultLanguageDifferences
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['defaultLanguageDifferences']

For details see defaultLanguageDifferences.

localizationStateSelector
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['localizationStateSelector']

For details see localizationStateSelector.

otherLanguageContent
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['otherLanguageContent']

For details see otherLanguageContent.

mode
Type
string (keywords)
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['mode']
Scope
Display

Possible keywords: useOrOverridePlaceholder

This property is related to the placeholder property. When defined, a checkbox will appear above the field. If that box is checked, the field can be used to enter whatever the user wants as usual. If the box is not checked, the field becomes read-only and the value saved to the database will be NULL .

Warning

In order for this property to apply properly, the DB column must be allowed to be NULL , and property nullable must be set to true .

nullable
Type
boolean
Default
false
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['nullable']
Scope
Proc.

If set to true, a checkbox will appear, which by default deactivates the field. In the deactivated state the field is saved as NULL in the database. By activating the checkbox it is possible to set a value. If nothing is entered into the field, then an empty string will be saved and not a NULL .

The database field must allow the NULL value.

Example: a nullable link field
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!
placeholder
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['placeholder']
Scope
Display

Placeholder, containing a default value.

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!

Note

As the TCA is cached it is not possible to set dynamic values such as now() .

readOnly
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['readOnly']
Scope
Display

Renders the field in a way that the user can see the value but cannot edit it.

Warning

This property affects only the display. It is still possible to write to those fields when using the DataHandler.

required
Type
boolean
Default
false
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['required']
Scope
Display / Proc.

If set to true a non-empty value is required in the field. Otherwise the form cannot be saved.

search
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['search']
Scope
Search

Defines additional search-related options for a given field.

pidonly
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['search']['pidonly']

Searches in the column only if search happens on the single page, does not search the field if searching in the whole table.

case
Type
boolean
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['search']['case']

Makes the search case-sensitive. This requires a proper database collation for the field, see your database documentation.

andWhere
Type
string
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['search']['andWhere']

Additional SQL WHERE statement without 'AND'. With this it is possible to place an additional condition on the field when it is searched

EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
$temporaryColumns['some_date'] => [
    'config' => [
        'search' => [
            'andWhere' => '{#CType}=\'type_x\' OR {#CType}=\'type_y\'',
        ],
        // ...
    ],
];
Copied!

This means that the "some_date" field of the "tt_content" table will be searched in only for elements of type X and Y. This helps making any search more relevant.

The above example uses the special field quoting syntax {#...} around identifiers to be as DBAL-compatible as possible.

size
Type
integer
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['size']
Scope
Display

Abstract value for the width of the <input> field. To set the link field to the full width of the form area, use the value 50. Minimum is 10. Default is 30.

valuePicker
Type
array
TCA path
$GLOBALS['TCA'][$table]['columns'][$field]['config']['valuePicker']
Scope
Display

Renders a select box with static values next to the input field. When a value is selected in the box, the value is transferred to the field. Keys:

mode (keyword)
blank (or not set)
The selected value substitutes the value in the input field
append
The selected value is appended to an existing value of the input field
prepend
The selected value is prepended to an existing value of the input field
items (array)
An array with selectable items. Each item is an array with the first value being the label in the select drop-down (plain text label or label reference) the second being the value transferred to the input field.
Example: A link field with value picker
EXT:my_extension/Configuration/TCA/tx_myextension_mytable.php
<?php

return [
  'ctrl' => [
    'title' => 'My table',
    'label' => 'a_link_field',
  ],
  'columns' => [
    'a_link_field' => [
      'label' => 'Link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
      ],
    ],

    'link_custom_handlers' => [
      'label' => 'Link to products',
      'config' => [
        'type' => 'link',
        'allowedTypes' => [
          'page',
          'url',
          // Both are custom link handlers
          'tx_myextension_product',
          'custom_identifier',
        ],
      ],
    ],

    'link_all_types' => [
      'label' => 'Link of any type',
      'config' => [
        'type' => 'link',
        // Allow all types (or skip this option)
        'allowedTypes' => ['*'],
      ],
    ],

    'link_some_options' => [
      'label' => 'Link with class and parameters',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Display only 'class' and 'params'
          'allowedOptions' => ['class', 'params'],
        ],
      ],
    ],

    'link_all_options' => [
      'label' => 'Link with all options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all options (or skip this option)
          'allowedOptions' => ['*'],
        ],
      ],
    ],

    'link_no_options' => [
      'label' => 'Link without options',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Deny all options
          'allowedOptions' => [],
        ],
      ],
    ],

    'link_email' => [
      'label' => 'Email link',
      'config' => [
        'type' => 'link',
        'allowedTypes' => ['email'],
        'appearance' => [
          'allowedOptions' => ['body', 'cc'],
        ],
      ],
    ],

    'link_images' => [
      'label' => 'Link to an image',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow only jpg and png file extensions
          'allowedFileExtensions' => ['jpg', 'png'],
        ],
      ],
    ],

    'link_files' => [
      'label' => 'Link to a file',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Allow all file extensions (or skip this option)
          'allowedFileExtensions' => ['*'],
        ],
      ],
    ],

    'link_title_label' => [
      'label' => 'Link with a translated browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Either provide a label reference (recommended)
          'browserTitle' => 'LLL:EXT:my_extension/Resources/Private/Language/locallang_db.xlf:my_custom_title',
        ],
      ],
    ],

    'link_title_string' => [
      'label' => 'Link with a browser title',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Or a simple string value
          'browserTitle' => 'My custom title',
        ],
      ],
    ],

    'link_no_browser' => [
      'label' => 'Link without link browser',
      'config' => [
        'type' => 'link',
        'appearance' => [
          // Disable the link browser
          'enableBrowser' => false,
        ],
      ],
    ],

    'link_autocomplete' => [
      'label' => 'A link with autocomplete',
      'config' => [
        'type' => 'link',
        'size' => 20,
        'nullable' => true,
        'autocomplete' => true,
      ],
    ],

    'link_nullable' => [
      'label' => 'A nullable link',
      'config' => [
        'type' => 'link',
        'nullable' => true,
      ],
    ],

    'link_placeholder' => [
      'label' => 'A link with a placeholder',
      'config' => [
        'type' => 'link',
        'placeholder' => 'https://typo3.org',
        'mode' => 'useOrOverridePlaceholder',
      ],
    ],

    'link_value_picker' => [
      'label' => 'My favorite web page',
      'config' => [
        'type' => 'link',
        'mode' => 'prepend',
        'valuePicker' => [
          'items' => [
            ['TYPO3.org', 'https://typo3.org'],
            [
              'TYPO3 Documentation',
              'https://docs.typo3.org',
            ],
            [
              'TYPO3 Ticket System',
              'https://forge.typo3.org',
            ],
          ],
        ],
      ],
    ],
  ],
  'types' => [
    '0' => [
      'showitem' => 'a_link_field',
    ],
  ],
];
Copied!

Note

The softref definition softref=typolink is automatically applied to all TCA type link columns.

Create an URL 

To create a URL from such a link field in a Fluid template, use the <f:link.typolink> or <f:uri.typolink> view helper.

In PHP code, inject LinkFactory and call create() or createUri() on it:

EXT:my_extension/Classes/Service/MyService.php
<?php

namespace MyVendor\MyExtension\Service;

use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
use TYPO3\CMS\Frontend\Typolink\LinkFactory;

class SomeService
{
  public function __construct(
    private readonly LinkFactory $linkFactory,
  ) {}

  public function getUri(string $tcaLinkValue, ContentObjectRenderer $contentObjectRenderer): string
  {
    return $this->linkFactory->createUri(
      $tcaLinkValue,
      $contentObjectRenderer
    );
  }
}
Copied!
  • Previous
  • Next
Reference to the headline

Copy and freely share the link

This link target has no permanent anchor assigned. You can make a pull request on GitHub to suggest an anchor. The link below can be used, but is prone to change if the page gets moved.

Copy this link into your TYPO3 manual.

  • Home
  • Contact
  • Issues
  • Repository

Last rendered: Oct 26, 2026 11:40

© since 2012 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy