I have a need to show for tt_content records the id of the colpos for regular editors on the production website, for now it is only shown in my development space website.
do you have an idea how to add it ? Thank you!
You can add a custom itemsProcFunc for the select field which is used for the colPos column here. Use TCA overrides to register it accordingly:
itemsProcFunc
select
colPos
\TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule( original: $GLOBALS['TCA']['tt_content'], overrule: [ 'columns' => [ 'colPos' => [ 'config' => [ 'itemsProcFunc' => \VENDOR\Extension\UserFunction\FormEngine\ItemProcessor::class . '->appendValueToLabel', ], ], ], ], );
The ItemProcessor class:
ItemProcessor
<?php declare(strict_types = 1); namespace VENDOR\Extension\UserFunction\FormEngine; final class ItemProcessor { public function appendValueToLabel(array &$params): void { foreach ($params['items'] as &$item) { $item['label'] = sprintf('%s [%s]', $item['label'], $item['value']); } } }
You can add a custom
itemsProcFuncfor theselectfield which is used for thecolPoscolumn here. Use TCA overrides to register it accordingly:The
ItemProcessorclass: