Category

type => 'category' // TCA

The Category type can handle relations to categories. The categories are taken from the system table sys_categories.

Settings

relationship
Required

false

Type

string

Depending on the relationship, the category relations is stored (internally) in a different way. Possible keywords are oneToOne, oneToMany or manyToMany (default).

maxitems
Required

false

Type

integer

Default

"0"

Maximum number of items. Defaults to a high value. JavaScript record validation prevents the record from being saved if the limit is not satisfied.

minitems
Required

false

Type

integer

Default

"0"

Minimum number of items. Defaults to 0. JavaScript record validation prevents the record from being saved if the limit is not satisfied. The field can be set as required by setting minitems to at least 1.

treeConfig.startingPoints
Required

false

Type

string

Allows to set one or more roots (category uids), from which the categories should be taken from.

Examples

Minimal

name: example/category
fields:
  - identifier: categories
    type: Category
Copied!

Advanced / use case

name: example/category
fields:
  - identifier: categories
    type: Category
    minitems: 1
    treeConfig:
      startingPoints: 7
    relationship: oneToOne
Copied!