Developer's guide
Table of Contents
Palettes
Palettes are used to group input fields. For example, you do not need all fields of table tl_content to set up a certain content element. Depending on the type of element, there is a particular set of form fields that have to be visible. These sets are called palettes. Here is a synatx example:
<?php $GLOBALS['TL_DCA']['table']['palettes']['key'] = ''; ?>
Available options
| Key | Value | Description |
|---|---|---|
| __selector__ | Selector fields array | One or more fields whose values will be used to determine which palette is to be loaded. |
| palette | Palette name string | Palette names are put together from the values of each selector field. Therefore, if you have two selector fields, there will be three possible palette names (fieldA, fieldB, fieldAfieldB). Please separate fields with comma (,) and groups with semicolon (;). |
Subpalettes
Subpalettes are loaded when a particular selector field has been activated. Typically, these selector fields are checkboxes and the corresponding subpalettes are loaded when they are checked. Note that you cannot group fields (separate them with a semicolon) in a subpalette. Here is a syntax example:
<?php $GLOBALS['TL_DCA']['table']['subpalettes']['key'] = ''; ?>
Available options
| Key | Value | Description |
|---|---|---|
| palette | Palette name string | Please separate fields with comma (,). |