#17606Enable overriding/renaming field labels by Page TSconfig
Description
You can override Item-Labels with TCEFORM.[table].[field].altLabels.[ID] = New Label
But it is not possible to rename the label of a field. Sometime it is indispensable to rename a field because you use the same table/column for different content or categories.
So there is a very easy solution to solve this problem. You only have to add one line in the t3lib.
Datei: class.t3lib_tceforms.php
Klasse: getSingleField()
Before:
$PA[‘label’] = $PA[‘altName’] ? $PA[‘altName’] : $PA[‘fieldConf’][‘label’];
$PA[‘label’] = $this->sL($PA[‘label’]);
After:
$PA[‘label’] = $PA[‘altName’] ? $PA[‘altName’] : $PA[‘fieldConf’][‘label’];
$PA[‘label’] = $PA[‘fieldTSConfig’][‘label’] ? $PA[‘fieldTSConfig’][‘label’] : $PA[‘label’]; // Creates TCEFORM.[table].[field].label = New Label
$PA[‘label’] = $this->sL($PA[‘label’]);
Example for usage in the PageTS:
TCEFORM.[table].[column].label = New Label
TCEFORM.[table].[column].label = LLL:EXT:my_ext/locallang_db.php:table.column
(issue imported from #M6346)
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.