Type: string Scope: Display / Proc. RenderType: all Default: manyToMany
All possible values are:
- Stores the uid of the selected category. When using this
maxitems=1will automatically be added to the column configuration. While one record can only have a relation to one category, each category can still have a relationship to more then one record.
- Stores the uids of selected categories in a comma-separated list.
manyToMany(default):Uses the intermediate table
sys_category_record_mmand only stores the categories count on the local side. This is the use case, which was previously accomplished using
In the following example a category tree is displayed, but only one category can be selected. It is
$GLOBALS['TCA'][$myTable]['columns']['mainCategory'] = [ 'config' => [ 'type' => 'category', 'relationship' => 'oneToOne' ] ];
All other relevant options, for example
maxitems=1, are being set automatically.