Attention
TYPO3 v11 has reached end-of-life as of October 31th 2024 and is no longer being maintained. Use the version switcher on the top left of this page to select documentation for a supported version of TYPO3.
Need more time before upgrading? You can purchase Extended Long Term Support (ELTS) for TYPO3 v11 here: TYPO3 ELTS.
Be.tableList ViewHelper <f:be.tableList>
ViewHelper which renders a record list as known from the TYPO3 list module.
Note
This feature is experimental!
Examples
Minimal:
<f:be.tableList tableName="fe_users" />
List of all "Website user" records stored in the configured storage PID.
Records will be editable, if the current backend user has got edit rights for the table fe_users
.
Only the title column (username) will be shown.
Context menu is active.
Full:
<f:be.tableList tableName="fe_users" fieldList="{0: 'name', 1: 'email'}"
storagePid="1"
levels="2"
filter="foo"
recordsPerPage="10"
sortField="name"
sortDescending="true"
readOnly="true"
enableClickMenu="false"
enableControlPanels="true"
clickTitleMode="info"
/>
List of "Website user" records with a text property of foo
stored on PID 1
and two levels down.
Clicking on a username will open the TYPO3 info popup for the respective record
Source code
Go to the source code of this ViewHelper: TableListViewHelper.php (GitHub).
Arguments
The following arguments are available for <f:
:
tableName
-
- Type
- string
- Required
true
Name of the database table
fieldList
-
- Type
- mixed
- Default
array
()
List of fields to be displayed. If empty, only the title column (configured in $TCA[$tableName]['ctrl']['title']) is shown
storagePid
-
- Type
- mixed
By default, records are fetched from the storage PID configured in persistence.storagePid. With this argument, the storage PID can be overwritten
levels
-
- Type
- mixed
Corresponds to the level selector of the TYPO3 list module. By default only records from the current storagePid are fetched
filter
-
- Type
- string
Corresponds to the "Search String" textbox of the TYPO3 list module. If not empty, only records matching the string will be fetched
recordsPerPage
-
- Type
- mixed
Amount of records to be displayed at once. Defaults to $TCA[$tableName]['interface']['maxSingleDBListItems'] or (if that's not set) to 100
sortField
-
- Type
- string
Table field to sort the results by
sortDescending
-
- Type
- boolean
If TRUE records will be sorted in descending order
readOnly
-
- Type
- boolean
If TRUE, the edit icons won't be shown. Otherwise edit icons will be shown, if the current BE user has edit rights for the specified table!
enableClickMenu
-
- Type
- boolean
- Default
true
Enables context menu
enableControlPanels
-
- Type
- boolean
Enables control panels
clickTitleMode
-
- Type
- string
One of "edit", "show" (only pages, tt_content), "info