[Typo3-dev] t3lib_extMgm::addToTCAtypes ?
Martin Kutschker
Martin.T.Kutschker at blackbox.net
Tue Sep 30 15:26:09 CEST 2003
Hi!
I can easily add a field to all pages. How about adding this method?
function addToTCAtypes($table,$types,$str) {
global $TCA;
$str = trim($str);
t3lib_div::loadTCA($table);
if ($str && is_array($TCA[$table]) &&
is_array($TCA[$table]['types'])) {
reset($TCA[$table]['types']);
$types = split(',',$types);
while(list(,$v)=each($types)) {
$TCA[$table]['types'][$v]['showitem'].=', '.$str;
}
}
}
Of course it would be nice if the Extension Kickstarter had an option to restrict a new field to specific (page) types.
Masi
More information about the TYPO3-dev
mailing list