TYPO3 Logo
TCA Reference
Release: main

Loading data.

  • Introduction
  • Examples
    • About the examples
    • How to use the styleguide extension
  • Best practises
    • Common fields
    • Language fields
  • Field definitions (columns)
    • Examples
    • Properties
      • config
      • Description
      • displayCond
      • exclude
      • Localization display (l10n_display)
      • Localization mode (l10n_mode)
      • label
      • onChange
  • Field types (config > type)
    • Introduction
    • Common properties
      • autoSizeMax
      • allowLanguageSynchronization behaviour
      • default
      • dontRemapTablesOnCopy
      • fieldControl
        • addRecord
        • editPopup
        • listModule
        • resetSelection
      • fieldInformation
      • fieldWizard
        • defaultLanguageDifferences
        • localizationStateSelector
        • otherLanguageContent
        • selectIcons
      • hideMoveIcons
      • itemsProcFunc
      • localizeReferencesAtParentLocalization
      • maxitems
      • minitems
      • MM
      • mode
      • multiple
      • placeholder
      • readOnly
      • required
      • search
      • size
      • softref
    • Category
      • Examples
      • Category field properties
        • default value
        • exclusiveKeys
        • relationship
        • treeConfig
    • Checkboxes
      • Default checkbox
      • Toggle checkbox
      • Labeled toggle checkbox
      • Properties
        • cols
        • default
        • eval
        • invertStateDisplay
        • items
        • renderType
        • validation
    • Color
      • Properties
        • nullable
        • size
        • valuePicker
    • Datetime
      • Properties
        • dbType
        • disableAgeDisplay
        • format
        • nullable
        • range
    • Email
      • Properties
        • autocomplete
        • eval
        • nullable
        • size
    • File
      • Properties
        • allowed
        • appearance
        • allowLanguageSynchronization behaviour
        • disableMovingChildrenWithParent behaviour
        • enableCascadingDelete
        • disallowed (type => file)
        • fieldInformation
        • fieldWizard
        • maxitems
        • minitems
        • overrideChildTca
        • readOnly
    • FlexForm field
      • About the data structure
      • FlexForm syntax
      • Examples
      • Properties
        • Data structure (ds)
        • ds_pointerField
        • ds_pointerField_searchParent
        • ds_pointerField_searchParent_subField
        • ds_tableField
    • Folder
      • Properties
        • elementBrowserEntryPoints
        • fieldControl
    • Group fields
      • Examples
      • Stored data values
      • Properties
        • allowed
        • appearance
        • elementBrowserEntryPoints
        • fieldControl
        • fieldWizard
        • filter
        • foreign_table
        • hideSuggest
        • MM
        • prepend_tname
        • suggestOptions
    • Image manipulation
      • Examples
      • Properties
        • allowedExtensions
        • cropVariants
        • file_field
    • IRRE / inline
      • Properties
        • appearance
        • disableMovingChildrenWithParent behaviour
        • enableCascadingDelete
        • customControls
        • filter
        • foreign_default_sortby
        • foreign_field
        • foreign_label
        • foreign_match_fields
        • foreign_selector
        • foreign_sortby
        • foreign_table
        • foreign_table_field
        • foreign_unique
        • MM
        • overrideChildTca
        • size
        • symmetric_field
        • symmetric_label
        • symmetric_sortby
      • Examples
    • Input
      • Properties
        • autocomplete
        • eval
        • is_in
        • max
        • min
        • nullable
        • size
        • valuePicker
    • Language fields
      • Introduction
      • Examples
      • Language field properties
      • Migration
      • History
    • Link
      • Properties
        • allowedTypes
        • appearance
        • autocomplete
        • nullable
        • size
        • valuePicker
    • The none field
      • Examples
      • Properties
        • format
        • pass_content
        • size
    • Number
      • Properties
        • autocomplete
        • format
        • nullable
        • range
        • size
        • slider
        • valuePicker
    • Pass through / virtual field
    • Password
      • Properties
        • autocomplete
        • hashed
        • nullable
        • passwordGenerator
        • size
    • Radiobuttons
      • Examples
      • Properties
        • items
    • Select fields
      • Select field properties
        • allowNonIdValues
        • authMode
        • appearance - selectCheckBox
        • default value
        • disableNoMatchingValueElement
        • exclusiveKeys
        • fileFolderConfig
        • foreign_table
        • foreign_table_prefix
        • foreign_table_where
        • itemGroups
        • items
        • MM
        • multiSelectFilterItems
        • treeConfig
        • sortItems
      • selectSingle
        • Examples
        • Properties
      • Select multiple values (selectSingleBox)
        • Example
        • Properties
      • selectCheckBox
        • Examples
        • selectCheckBox and type check fields compared
        • Properties
      • selectMultipleSideBySide
        • Examples
        • Properties
      • selectTree
        • Examples
        • A happy little tree!
        • Properties
    • Slugs / URL parts
      • Introduction
      • Examples
      • Properties
        • appearance
        • eval
        • fallbackCharacter
        • generatorOptions
        • prependSlash
    • Text areas & RTE
      • Properties
        • cols
        • enableRichtext
        • enableTabulator
        • eval
        • fixedFont
        • format
        • is_in
        • max
        • min
        • nullable
        • richtextConfiguration
        • rows
        • wrap
      • text (default)
        • Examples
        • Properties
      • belayoutwizard
        • Example
        • Properties
      • t3editor
        • Example
        • Properties
      • textTable
        • Example
        • Properties
    • Custom inputs (user)
  • Table properties (ctrl)
    • Examples
    • Properties
      • adminOnly
      • container
      • copyAfterDuplFields
      • crdate
      • default_sortby
      • delete
      • descriptionColumn
      • editlock
      • enablecolumns
      • EXT
      • formattedLabel_userFunc
      • formattedLabel_userFunc_options
      • groupName
      • hideAtCopy
      • hideTable
      • iconfile
      • is_static
      • label
      • label_alt
      • label_alt_force
      • label_userFunc
      • languageField
      • origUid
      • prependAtCopy
      • readOnly
      • rootLevel
      • searchFields
      • security
      • selicon_field
      • shadowColumnsForNewPlaceholders
      • sortby
      • title
      • translationSource
      • transOrigDiffSourceField
      • transOrigPointerField
      • tstamp
      • type
      • typeicon_classes
      • typeicon_column
      • useColumnsForDefaultValues
      • versioningWS
      • versioningWS_alwaysAllowLiveEdit
  • Backend display (interface)
    • Examples
    • Properties
  • Grouping fields (palettes)
    • Examples
    • Properties
      • isHiddenPalette
      • label
      • description
      • showitem
  • Fields to be displayed (types)
    • Introduction
    • Examples
    • Properties
      • bitmask_excludelist_bits
      • bitmask_value_field
      • columnsOverrides
      • showitem
      • subtype_value_field
      • subtypes_addlist
      • subtypes_excludelist
  • Sitemap
  • Index

PAGE CONTENTS

  • Link
    • Example
    • Migration
  1. Start
  2. Field types (config > type)
  3. Link
View source How to edit Edit on GitHub

Display settings


Color scheme of code blocks:


Link¶

New in version 12.0: The TCA type link has been introduced. It replaces the renderType=inputLink option of TCA type input.

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

Example¶

A simple link field:

'a_link_field' => [
    'label' => 'Link',
    'config' => [
        'type' => 'link',
        'allowedTypes' => ['page', 'url', 'record'],
    ]
]

Migration¶

The previously configured linkPopup field control is now integrated into the new TCA type directly. Additionally, instead of exclude lists (blindLink[Fields|Options]), does the new type now use include lists. Those lists are furthermore no longer comma separated, but PHP array's, with each option as a separate value.

The migration from renderType=inputLink to type=link is done like following:

// Before

'a_link_field' => [
    'label' => 'Link',
    'config' => [
        'type' => 'input',
        'renderType' => 'inputLink',
        'required' => true,
        'size' => 20,
        'max' => 1024,
        'eval' => 'trim,null',
        'fieldControl' => [
            'linkPopup' => [
                'disabled' => true,
                'options' => [
                    'title' => 'Browser title',
                    'allowedExtensions' => 'jpg,png',
                    'blindLinkFields' => 'class,target,title',
                    'blindLinkOptions' => 'mail,folder,file,telephone',
                ],
            ],
        ],
        'softref' => 'typolink',
    ],
],

// After

'a_link_field' => [
    'label' => 'Link',
    'config' => [
        'type' => 'link',
        'required' => true,
        'size' => 20,
        'nullable' => 'true',
        'allowedTypes' => ['page', 'url', 'record'],
        'appearance' => [
            'enableBrowser' => false,
            'browserTitle' => 'Browser title',
            'allowedFileExtensions' => ['jpg', 'png'],
            'allowedOptions' => ['params', 'rel'],
        ],
    ]
]

An automatic TCA migration is performed on the fly, migrating all occurrences to the new TCA type and triggering a PHP E_USER_DEPRECATED error where code adoption has to take place.

Note

The value of TCA type link columns is automatically trimmed before being stored in the database. Therefore, the eval=trim option is no longer needed and should be removed from the TCA configuration.

  • Properties
    • allowedTypes
    • appearance
    • autocomplete
    • nullable
    • size
    • valuePicker
  • Previous
  • Next
  • Home
  • Contact
  • Issues
  • Repository

Last updated: Jan 29, 2023 15:44

Last rendered: Jan 29, 2023 15:45

  • TYPO3 Theme 4.7.9
  • DRC v3.0.dev30
© Copyright since 2012 by the TYPO3 contributors
  • Legal Notice
  • Privacy Policy
  • Code of Conduct