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.
foreign_sortby
foreign_sortby
-
- Type
- string
- Path
- $GLOBALS['TCA'][$table]['columns'][$field]['config']
- Scope
- Display / Proc.
Define a field on the child record that stores the manual sorting information. It is possible to have a different sorting, depending from which side of the relation we look at parent or child.
Attention
Do not confuse this property with foreign_default_sortby. The
foreign_
field contains an integer and is managed by the DataHandler. If by accident a content column like "title" is set assortby foreign_
, the DataHandler will write these integers into that field, which is most likely not what you want. Usesortby foreign_
in this case.default_ sortby This property requires that the foreign_field approach is used.
When using MM relations the field used on the intermediate table is hardcoded to
sorting_
. Setting this property has no effect combined with an MM table.foreign Warning
If you use the table only as an inline element, do not put the sortby field in the ctrl section, otherwise TYPO3 CMS will sort the entire table with every update. For example, if you have 10000 records, each with 4 inline elements, TYPO3 CMS will sort 40000 records even if only 4 must be sorted.