Skip to main content
Keel Docs Showcase

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:

  • classes decides which classes get a list.
  • collections changes 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

KeyDefaultWhat 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).

KeyDefaultWhat it does
classthe list key's classClass name. Needed for a new list.
enabledtruefalse hides the list
titlethe class titleList name in the menu
singularthe titleName of one item, for "+ New …"
iconthe class iconMenu icon (an icon path, as for a Pimcore class icon). Easier: pick one in Customize.
groupthe class groupMenu group the list is shown under
conditionnoneShow only some objects: a database condition on the class's fields, e.g. type = "cruise"
foldernoneParent folder for new objects
labelautomaticField used as the row and item label
columnsautomaticField 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_bylast change (modificationDate)Field the list is sorted by
orderDESCASC (A to Z, 1 to 9) or DESC (Z to A, 9 to 1)
defaults{}Field values for new objects
status_fieldautomaticSelect 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

yaml
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.