Content: classes and lists
What it does
Keel reads your class definitions and gives every data object class a list in the menu. Two keys change that:
classesdecides which classes get a list.collectionschanges a list (its name, columns, sort, status field…) or adds an extra list, for example a filtered part of a class.
Default
Every class gets a list, named after the class title, starting with five columns chosen from its fields (admins and users can show more).
Options: classes
| Key | Default | What it does |
|---|---|---|
classes.include | [] (all) | Class names that get a list. Empty means all. |
classes.exclude | [] | Class names to hide from editors, e.g. imports or logs |
Options: collections
Each entry is a list key with its settings. The key of an automatic list is its class name in lower case with dashes: SpecialOffer → special-offer. Using that key changes the automatic list. Any other key adds a new list (then class is required).
| Key | Default | What it does |
|---|---|---|
class | the list key's class | Class name. Needed for a new list. |
enabled | true | false hides the list |
title | the class title | List name in the menu |
singular | the title | Name of one item, for "+ New …" |
icon | the class icon | Menu icon (an icon path, as for a Pimcore class icon). Easier: pick one in Customize. |
group | the class group | Menu group the list is shown under |
condition | none | Show only some objects: a database condition on the class's fields, e.g. type = "cruise" |
folder | none | Parent folder for new objects |
label | automatic | Field used as the row and item label |
columns | automatic | Field names shown as table columns, in order (at most lists.max_columns, when set); Assigned to, Changed and Publication follow as always. Without them a list shows lists.default_columns columns |
order_by | last change (modificationDate) | Field the list is sorted by |
order | DESC | ASC (A to Z, 1 to 9) or DESC (Z to A, 9 to 1) |
defaults | {} | Field values for new objects |
status_field | automatic | Select field shown as status chips and Open / Closed tabs. See Statuses. |
Variants and inheritance
Keel reads Allow inheritance and Allow variants from the class: there is nothing to configure. A class with variants lists its items, with the variants under their rows and in the Filter panel. See Variants and inherited values.
Example
keel:
classes:
exclude: [SearchFilter]
collections:
enquiry: # changes the automatic Enquiry list
singular: Enquiry
columns: [name, email, enquiryType, status]
status_field: status
upcoming: # adds a list
class: Departure
title: Upcoming departures
condition: 'startDate >= UNIX_TIMESTAMP()'
order_by: startDate
order: ASC
cruise: # adds a list with its own "+ New"
class: Tour
title: Cruises
condition: 'type = "cruise"'
defaults: { type: cruise }
What admins change in Customize
In Customize → Lists admins switch lists on and off, set the order, the name in the menu, the group and the icon. In Customize → Columns they pick the columns (as many as they like, unless lists.max_columns sets a limit). Their choices win over keel.yaml. condition, folder, label, defaults, singular and order_by are only in keel.yaml.
For field labels and help texts in the editor, see Data model.