git :navigation-title: be.tableList

Be.tableList ViewHelper <f:be.tableList>

Screenshot of a table of categories.

ViewHelper which renders a record list as known from the TYPO3 list module.

Note: This feature is experimental!

Go to the source code of this ViewHelper: Be\TableListViewHelper.php (GitHub).

Table of contents

Examples

Display and make editable the content elements of page 1 and its direct children:

EXT:my_extension/Resources/Private/Backend/Templates/MyModule.html
<f:be.tableList
    tableName="tt_content"
    fieldList="{0: 'header', 1: 'CType'}"
    storagePid="1"
    levels="2"
    enableControlPanels="1"
/>
Copied!
Screenshot of a table of content elements with edit options.

List all categories on page 5 and make them editable when clicking the title:

EXT:my_extension/Resources/Private/Backend/Templates/MyModule.html
<f:be.tableList
    tableName="sys_category"
    fieldList="{0: 'title', 1: 'parent'}"
    storagePid="4"
    clickTitleMode="edit"
/>
Copied!
Screenshot of a table of categories.

Arguments

clickTitleMode

clickTitleMode
Type
string
Default
''
one of "edit", "show" (only pages, tt_content), "info

enableClickMenu

enableClickMenu
Type
bool
Default
true
enables context menu

enableControlPanels

enableControlPanels
Type
bool
Default
false
enables control panels

fieldList

fieldList
Type
array
Default
array ( )
list of fields to be displayed. If empty, only the title column (configured in $TCA[$tableName]['ctrl']['title']) is shown

filter

filter
Type
string
Default
''
corresponds to the "Search String" textbox of the TYPO3 list module. If not empty, only records matching the string will be fetched

levels

levels
Type
int
Default
0
corresponds to the level selector of the TYPO3 list module. By default only records from the current storagePid are fetched

readOnly

readOnly
Type
bool
Default
false
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!

recordsPerPage

recordsPerPage
Type
int
Default
0
amount of records to be displayed at once. Defaults to 100

sortDescending

sortDescending
Type
bool
Default
false
if TRUE records will be sorted in descending order

sortField

sortField
Type
string
Default
''
table field to sort the results by

storagePid

storagePid
Type
int
by default, records are fetched from the storage PID configured in persistence.storagePid. With this argument, the storage PID can be overwritten

tableName

tableName
Type
string
Required
1
name of the database table