[TYPO3-dev] Subtitle
Peter Klein
peter at clioonline.dk
Mon Aug 29 19:44:27 CEST 2011
It works, but it's not added in the same manner of the rest of the
fields due to the palette changes.
But then it's possible to change the palette reference instead, as
there's already one with subheader present (the one for the Header
element)
So changing the code to this will enable the subheader in the correct
way. (There might be some TS setup that has to be copied over from the
header element in order for it to render correctly in FE).
-- cut --
if
(!preg_match('%LLL:EXT:cms/locallang_ttc\.xml:palette\.header;header%',
$subject)) {
$TCA['tt_content']['types']['text']['showitem'] =
preg_replace('%LLL:EXT:cms/locallang_ttc\.xml:palette\.header;header%',
'LLL:EXT:cms/locallang_ttc.xml:palette.headers;headers',
$TCA['tt_content']['types']['text']['showitem']);
}
-- cut --
--
Peter Klein
On Mon, 29 Aug 2011 18:32:36 +0200, Björn Pedersen
<pedersen at frm2.tum.de> wrote:
>Am 29.08.2011 18:30, schrieb Peter Klein:
>> Hi Robert.
>>
>> It looks like t3lib_extMgm::addToAllTCAtypes() is broken in TYPO3
>> v4.5+, as it works as it's supposed to in previous versions of TYPO3.
>>
>> You could use a "dirty" approch and use regex to insert the extra
>> field, until the bug is fixed.
>>
>> -- cut --
>> t3lib_div::loadTCA("tt_content");
>> if (!preg_match('/subheader;;8,/',
>> $TCA['tt_content']['types']['text']['showitem'])) {
>> $TCA['tt_content']['types']['text']['showitem'] =
>> preg_replace('/;header,/', '$0subheader;;8,',
>> $TCA['tt_content']['types']['text']['showitem']);
>> }
>> -- cut --
>
>This won't work, as the TCA changed to use palettes for all fields now.
>
>Björn
More information about the TYPO3-dev
mailing list