Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v10 here: TYPO3 ELTS.
eval
eval
-
- Type
- string (list of keywords)
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Proc. / Display
Configuration of field evaluation.
Keywords:
- unique
- Evaluate if a record is unique in the whole TYPO3 installation (specific to a language). This option is recommended as it allows to show any record stored inside other sites. The only downside is that it is not possible to have the same slug on multiple sites.
- uniqueInSite
-
Requires the field to be unique for the current site and language. This allows for multiple records of the same table to have the same slug as long as these records are separated by their sites. Consequently records of a foreign site are not accessible with
unique
since slugs are looked up respecting the current site.Insite Warning
Be aware that using this option makes it impossible to show records stored inside other sites. If this is required,
unique
should be used instead. - uniqueInPid
- Requires the field to be unique for the current PID among other records on the same page.
No other eval setting is checked for. It is possible to set different eval options, however it is recommended not to do so.
Examples
eval = uniqueInSite
[
'columns' => [
'slug_2' => [
'exclude' => 1,
'label' => 'slug_2',
'config' => [
'type' => 'slug',
'size' => 50,
'generatorOptions' => [
'fields' => [
'input_1',
],
'fieldSeparator' => '/',
'prefixParentPageSlug' => true,
],
'fallbackCharacter' => '-',
'eval' => 'uniqueInSite',
'default' => '',
],
],
],
]