[TYPO3-english] $GLOBALS['TCA']['tt_content']['palettes']
Christian Tauscher
christian.tauscher at media-distillery.de
Wed May 17 16:51:11 CEST 2017
Hi there!
my goal: remove in tt_content via php the imagecols field an move to a
other palette.
so I forst remove the fiel in patellte und add it again to an other palette.
Caches are cleared (!), even removed with rm *.
this is the content of the palette-configuration:
imageorient;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imageorient_formlabel,
imagecols;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:imagecols_formlabel
My try to remove:
In myExt:.../Configuration/TCA/tt_content.php:
$GLOBALS['TCA']['tt_content']['palettes']['gallerySettings']['showitem'] =
preg_replace('/imagecols(.*,|.*$)/', '',
$GLOBALS['TCA']['tt_content']['palettes']['gallerySettings']['showitem']);
the result is: the pallette seems untouched.
directly after the call I added an
die($GLOBALS['TCA']['tt_content']['palettes']['gallerySettings']['showitem']).
How can this be? What ist the right way to do this?
Adding works fine with
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette()
is there a \ExtensionManagementUtility::REMOVEFieldsToPalette()?
could not find a call like this.
Thanks a lot for directing me the right way.
Christian.
More information about the TYPO3-english
mailing list