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
<?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',
],
],
];
Properties of the TCA column type link
| Name | Type | Scope |
|---|---|---|
| array of keywords | Display / Proc. | |
| boolean | Proc. | |
| array | Display | |
| array | ||
| array | ||
| string, LLL | ||
| boolean | ||
| boolean | Display | |
| string | Display / Proc. | |
| array | ||
| array | ||
| array | ||
| string (keywords) | Display | |
| boolean | Proc. | |
| string | Display | |
| boolean | Display | |
| boolean | Display / Proc. | |
| array | Search | |
| boolean | ||
| boolean | ||
| string | ||
| integer | Display | |
| array | Display |
-
- 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
- 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', ], ], ];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', ], ], ];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', ], ], ];
-
-
- 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_. It tells the DataHandler which fields of the localization records should be kept in sync if the underlying default or source record changes.state EXT:my_extension/Configuration/TCA/Overrides/tx_myextension_mytable.php
-
- Type
- array
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']
- Scope
- Display
Has information about the appearance, namely:
-
- 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[](emptyarray).- class
- Custom CSS classes for the link
- params
- Additional link parameters
- target
- Either empty,
_topor_blank - title
- The
titleattribute of the link - rel
- The link relationship. Only available for RTE enabled fields and if
buttons.is enabled in the RTE YAML configuration.link. rel Attribute. enabled
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', ], ], ];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', ], ], ];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', ], ], ];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', ], ], ];
-
- 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', ], ], ];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', ], ], ];
-
- Type
- string, LLL
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['appearance']['browserTitle']
Allows to set a different
titleattribute for the Link Browser icon, defaults toLink.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', ], ], ];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', ], ], ];
-
- 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', ], ], ];
-
- Type
- boolean
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['autocomplete']
- Scope
- Display
Controls the
autocompleteattribute of a given link field. If set to true (default false), adds attributeautocomplete="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', ], ], ];
-
- Type
- string
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['default']
- Scope
- Display / Proc.
Default value set if a new record is created.
-
For details see fieldControl.
-
For details see fieldInformation.
-
-
- Type
- array
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['defaultLanguageDifferences']
For details see defaultLanguageDifferences.
-
- Type
- array
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['localizationStateSelector']
For details see localizationStateSelector.
-
- Type
- array
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['fieldWizard']['otherLanguageContent']
For details see otherLanguageContent.
-
- Type
- string (keywords)
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['mode']
- Scope
- Display
Possible keywords:
useOr Override Placeholder This property is related to the
placeholderproperty. 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 beNULL.Warning
In order for this property to apply properly, the DB column must be allowed to be
NULL, and propertynullablemust be set totrue.
-
- 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
NULLin 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 aNULL.The database field must allow the
NULLvalue.
<?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',
],
],
];
-
- 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', ], ], ];Note
As the TCA is cached it is not possible to set dynamic values such as
now.()
-
- 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.
-
- 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.
-
- Type
- array
- TCA path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']['search']
- Scope
- Search
Defines additional search-related options for a given field.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
-
- 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.
<?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',
],
],
];
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: or
<f: view helper.
In PHP code, inject
Link
and call
create or
create on it:
<?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
);
}
}