[TYPO3-dev] Adding BE columns from extension ?

Tapio Markula tapio.markula at atwebteam.com
Tue Sep 26 19:04:37 CEST 2006


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.




More information about the TYPO3-dev mailing list