Developer's guide
Table of Contents
Sorting
The sorting subgroup allows you to define how records are sorted. Here is a syntax example:
<?php $GLOBALS['TL_DCA']['table']['list']['sorting']['key'] = ''; ?>
Available options
| Key | Value | Description |
|---|---|---|
| mode | Sorting mode integer | 0 Records are not sorted 1 Records are sorted by the default sorting value 2 Records are sorted by a switchable sorting value 3 Records are sorted by the parent table 4 Records are displayed as header element and child elements (e.g. module style sheet) 5 Records are shown as tree (e.g. page tree) 6 Records are shown as tree including child table elements (e.g. article tree) |
| flag | Sorting flag integer | 1 Sort by initial letter ascending 2 Sort by initial letter descending 3 Sort by initial two letters ascending 4 Sort by initial two letters descending 5 Sort by day ascending 6 Sort by day descending 7 Sort by month ascending 8 Sort by month descending 9 Sort by year ascending 10 Sort by year descending 11 Sort ascending 12 Sort descending |
| panelLayout | Panel layout string | search show the search records form sort show the sort records form filter show the filter records form limit show the limit records form You can define the order by building palettes with comma (= space) and semicolon (= new line) like sort,filter;search,limit |
| fields | Default sorting values array | One or more fields that are used to sort the table. |
| headerFields | Header fields array | One or more fields that will be shown in the header element (sorting mode 4 only). |
| icon | Tree icon string | Path to an icon that will be shown on top of the tree (sorting mode 5 and 6 only). |
| root | Root nodes array | IDs of the root records (pagemounts). This value usually takes care of itself. |
| paste_button_callback | Callback function array | This function will be called instead of displaying the default paste buttons. Please specify as array('Class', 'Method'). |
| child_record_callback | Callback function array | This function will be called to render the child elements (sorting mode 4 only). Please specify as array('Class', 'Method'). |
Labels
The label subgroup allows you to define the labels shown in the list. Here is a syntax example:
<?php $GLOBALS['TL_DCA']['table']['list']['label']['key'] = ''; ?>
Available options
| Key | Value | Description |
|---|---|---|
| fields | Fields array | One or more fields that will be shown in the list. |
| format | Format string string | HTML string used to format the fields that will be shown (e.g. <strong>%s</strong>). |
| maxCharacters | Number of characters integer | Maximum number of characters of the label. |
| label_callback | Callback function array | Call a custom function instead of using the default label function. Please specify as array('Class', 'Method'). |