Project

General

Profile

Actions

Feature #17606

closed

Enable overriding/renaming field labels by Page TSconfig

Added by Malte Jansen about 17 years ago. Updated over 14 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2007-09-14
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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)


Files

0006346.patch (1.1 KB) 0006346.patch Administrator Admin, 2007-09-17 15:09
class.tx_majalabelrename_tceforms_xclass.php (4.64 KB) class.tx_majalabelrename_tceforms_xclass.php Administrator Admin, 2007-09-18 18:51
PageTS_LOCALLANG_v1.patch (4.57 KB) PageTS_LOCALLANG_v1.patch Administrator Admin, 2007-10-09 21:02
LabelOverriding_v1_(trunk).patch (736 Bytes) LabelOverriding_v1_(trunk).patch Administrator Admin, 2007-11-06 14:53
Actions

Also available in: Atom PDF