drucken :: thefox : 21.12.2010
aus Beschreibung ein RTE Feld machen
Code Schnipsel: TCA von tt_address verädern, damit bei Beschreibung (description) der RTE verwendet werden kann.
// TCA laden
t3lib_div::loadTCA('tt_address');
// aus tt_address description ein RTE feld machen.
// -> config von tt_content bodytext übernehmen
$TCA['tt_address']['columns']['description']['config'] = $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config'];
// kann je nach tt_address Version auch ['types']['0'] sein!
$TCA['tt_address']['types']['1']['showitem'] = str_replace('description', 'description;;;richtext:rte_transform[flag=rte_enabled|mode=ts_css]', $TCA['tt_address']['types']['1']['showitem']);
In die Datei ext_tables.php deiner Extension einfügen
$GLOBALS['TCA']['tt_address']['columns']['description']['config'] = $GLOBALS['TCA']['tt_content']['columns']['bodytext']['config'];
// kann je nach tt_address Version auch ['types']['0'] sein!
$GLOBALS['TCA']['tt_address']['types']['1']['showitem'] = str_replace('description', 'description;;;richtext:rte_transform[flag=rte_enabled|mode=ts_css]', $GLOBALS['TCA']['tt_address']['types']['1']['showitem']);
Im Ordner typo3conf in die Datei extTables.php einfügen
plugin.tx_ttaddress_pi1 {
templates.default {
description {
parseFunc = < lib.parseFunc_RTE
}
}
}
Damit die Ausgabe entsprechend funktioniert, sollte man das typoscript anspassen

- vorher

- nachher