[TYPO3-dev] Adding BE columns from extension ?
Steffen Kamper
steffen at dislabs.de
Tue Sep 26 19:18:48 CEST 2006
Hi Tapio,
first of all thx for such quick reply ;)
"Tapio Markula" <tapio.markula at atwebteam.com> schrieb im Newsbeitrag
news:mailman.1.1159290563.28910.typo3-dev at lists.netfielders.de...
> Steffen Kamper kirjoitti:
>> Hi list,
>>
>> sry, i run in problems so often, so i have to post again.
>>
>> When I add some BE-Columns, i can do this in localconf.php or in
>> ext_tables.php.
>
> latter TCA is either in ext_tables.php or in a separate tca.php
>
>>
>> But now i tried this in a BE-Modul in ext_tables.php and it seems to be
>> to late - TCA Array is correct after it, but the BE Columns still the
>> normal ones.
>> Here is the code:
>>
>> $TCA['tt_content']['columns']['colPos']['config']['items']['4']['0'] =
>> 'SUB-LINKS';
>> $TCA['tt_content']['columns']['colPos']['config']['items']['4']['1'] = 4;
>> $TCA['tt_content']['columns']['colPos']['config']['items']['5']['0'] =
>> 'SUB-RECHTS';
>> $TCA['tt_content']['columns']['colPos']['config']['items']['5']['1'] = 5;
>>
>> I tried to do with t3lib_extMgm::addTCAcolumns also, but same result.
>
> if you define at that way, load first the table tt_content with existing
> values.
>
> t3lib_div::loadTCA("tt_content");
> $TCA['tt_content']['columns']['colPos']['config']['items']['4']['0'] =
> > 'SUB-LINKS';
> ...
> this is safe way because you don't delete any values.
> If you reset fields, you might take off some field value, which has been
> set by another plugin.
> Now you just add or reset defined values.
sry, i forgot to write it, but i did this before
:t3lib_div::loadTCA('tt_content');
so the TCA-Array is extended after this, but the BE-columns not ...
vg Steffen
More information about the TYPO3-dev
mailing list