Skip to content

Problem on https://docs.typo3.org/m/typo3/reference-tca/main/en-us//ColumnsConfig/Type/Select/Single/Index.html #1287

@exakaem

Description

@exakaem

Current behavior

In the section "Sort items by a custom method", the provided example function still works with numbered indices like $item[0]

Expected behavior/output

The example should work with labeled indices like $item['label'] or $item['value']

Links

https://docs.typo3.org/m/typo3/reference-tca/main/en-us/ColumnsConfig/Type/Select/Single/Index.html#sort-items-by-a-custom-method

TYPO3 versions

12, 13, main

Possible Solution

replace $item1[0] and $item2[0] with $item1['label'] and $item2['label'] respectively

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions