[TYPO3-dev] override or extend TCA by TypoScript
Franz Holzinger
franz at ttproducts.de
Sat Dec 20 13:22:09 CET 2008
Hello,
I think that it is necessary to be able to override the $TCA from
tca.php or ext_tables.php by a user configurable TypoScript for a FE
extension using $TCA.
'gender' => Array (
'exclude' => 0,
'label' => 'LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender',
'config' => Array (
'type' => 'radio',
'items' => Array (
Array('LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender.I.0',
'0'),
Array('LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender.I.1',
'1'),
Array('LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender.I.99',
'99'),
),
)
),
Which syntax should this use?
E.g.
plugin.tx_srfeuserregister_pi1.tca.fe_users {
column.gender.config.items {
LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender.I.0 = 0
LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender.I.1 = 1
LLL:EXT:sr_feuser_register/locallang_db.xml:fe_users.gender.I.99 = 99
}
}
Or maybe:
plugin.tx_srfeuserregister_pi1.tcaOverrideFile =
fileadmin/ext/sr_feuser_register/ext_tables_override.php
plugin.tx_srfeuserregister_pi1.tcaOverrideFile =
EXT:sr_feuser_register/ext_tables_override.php
Then this file could be included to override e.g. the allowed items for
the gender. In the future it shall be possible to not set the gender at
all, so set it to empty or the value 99, However some sites will not
want this. Therefore this must be made configurable somehow with
TypoScript. Maybe only the backend shall allow a not set gender, and
some registrations on the FE, too, but not all of them. Others might
want to have a gender 'Fräulein'.
- Franz
More information about the TYPO3-dev
mailing list