Bug #16463
closedTCEFORM altLabels & addItems CType doesn't change Page-Modul CE Labels
0%
Description
If you change labels of CTypes with
TCEFORM.tt_content.CType.altLabels...
the new Label isn't assigned to the Label of a CE in Page-Modul overview
If you add items with
TCEFORM.tt_content.CType.addItems....
the label isn't assigned to the Label of a CE in Page-Modul overview
A quick $ dirty solution:
change lines 389 - 397 in class.tx_cms_layout.php (based on 4.0.1)
from:
// Get labels for CTypes and tt_content element fields in general:
$this->CType_labels =array();
foreach($TCA['tt_content']['columns']['CType']['config']['items'] as $val) {
$this->CType_labels[$val1]=$GLOBALS['LANG']->sL($val0);
}
$this->itemLabels =array();
foreach($TCA['tt_content']['columns'] as $name => $val) {
$this->itemLabels[$name]=$GLOBALS['LANG']->sL($val['label']);
}
to:
// Get labels for CTypes and tt_content element fields in general:
$this->CType_labels =array();
$pageTSConfig = t3lib_BEfunc::getPagesTSconfig($id);
foreach($TCA['tt_content']['columns']['CType']['config']['items'] as $val) { $this->CType_labels[$val1]=$GLOBALS['LANG']->sL($val0);
if (isset($pageTSConfig['TCEFORM.']['tt_content.']['CType.']['altLabels.'][$val1])) {
$this->CType_labels[$val1] = $GLOBALS['LANG']->sL($pageTSConfig['TCEFORM.']['tt_content.']['CType.']['altLabels.'][$val1]);
}
}
if (is_array($pageTSConfig['TCEFORM.']['tt_content.']['CType.']['addItems.'])) {
foreach($pageTSConfig['TCEFORM.']['tt_content.']['CType.']['addItems.'] as $item => $val) {
$this->CType_labels[$item] = $GLOBALS['LANG']->sL($val);
}
}
$this->itemLabels =array();
foreach($TCA['tt_content']['columns'] as $name => $val) {
$this->itemLabels[$name]=$GLOBALS['LANG']->sL($val['label']);
}
(issue imported from #M4033)