#97822Option to confiigure primary / secondary actions in list view
Description
Many of my users complain that some of the actions in the list view are hidden by default. Good because the backend gets a bit more cleaned up, better if we could configure it.
That’s how it could work:
USER TSCONFIG:
_options.record_list.actionsPrimary =edit,hide,delete,moveUp,moveDown,divider,copy,cut,pasteAfter,pasteInto
options.record_list.actionsSecondary =view,viewBig,history,stat,perms,new,move,moveLeft, moveRight,version_
Then in:
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php line 2226
@
// CHANGE IN CORE:
<?php
public function addActionToCellGroup(&$cells, $action, $actionKey)
{$cellsMap = [
‘primary’ => [
‘edit’, ‘hide’, ‘delete’, ‘moveUp’, ‘moveDown’,‘divider’,‘copy’, ‘cut’, ‘pasteAfter’, ‘pasteInto’,
],
‘secondary’ => [
‘view’, ‘viewBig’, ‘history’, ‘stat’, ‘perms’, ‘new’, ‘move’, ‘moveLeft’, ‘moveRight’, ‘version’,
],
];
//ADDED TO BE ABLE TO CONFIGURE BUTTONS IN LIST VIEW VIA TSCONFIG
if($userTsConfig[‘options.’][‘record_list.’][‘actionsPrimary’])
{
$actionsPrimary =explode(“,”, $userTsConfig[‘options.’][‘record_list.’][‘actionsPrimary’]) ;
$actionsPrimary = array_map(‘trim’, $actionsPrimary);
$cellsMap[primary] = array($actionsPrimary);
}
if($userTsConfig[‘options.’][‘record_list.’][‘actionsSecondary’])
{
$actionsPrimary =explode(“,”, $userTsConfig[‘options.’][‘record_list.’][‘actionsSecondary’]) ;
$actionsPrimary = array_map(‘trim’, $actionsSecondary);
$cellsMap[primary] = array($actionsSeconary);
}
// END OF CHANGE
$classification = in_array($actionKey, $cellsMap[‘primary’]) ? ‘primary’ : ‘secondary’;
$cells[$classification][$actionKey] = $action;
unset($cells[$actionKey]);
}
?>
@Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
History 1
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-09-29T19:03:44+00:00" > 09/29/26, 19:03 </span>
this is possible with
ModifyRecordListRecordActionsEvent, see https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Events/Events/Backend/ModifyRecordListRecordActionsEvent.html