[TYPO3] Problem understanding $TCA['tt_content']['types']

Dmitry Dulepov [typo3] dmitry at typo3.org
Mon Apr 21 10:56:48 CEST 2008


Hi!

micho edo wrote:
> maybe you can help me another time.
> where cna I define which type a frontendplugin shall use.
> 
> The kickstarter generated:
> $TCA['tt_content']['types']['list']['subtypes_excludelist'][$_EXTKEY.'_pi1']= 
>  'layout,select_key';
> t3lib_extMgm::addPiFlexFormValue($_EXTKEY.'_pi1', 
> 'FILE:EXT:'.$_EXTKEY.'/flexform_ds.xml');
> t3lib_extMgm::addPlugin(array('LLL:EXT:bbc_ruby/locallang_db.xml:tt_content.list_type_pi1', 
> $_EXTKEY.'_pi1'),'list_type');
> 
> I think the type here is: 'list'.
> The addPlugin function defined as type: 'list_type'
> 
> If a want to add an new typ test77, is this code correct?
> 
> $TCA['tt_content']['types']['test77']['subtypes_excludelist'][$_EXTKEY.'_pi1']= 
>  'layout,select_key';

Add also "pages" here. No one uses these fields in modern plugins.

> t3lib_extMgm::addPlugin(array('LLL:EXT:bbc_ruby/locallang_db.xml:tt_content.list_type_pi1', 
> $_EXTKEY.'_pi1'),'test77_type');

You could get all this automatically if you generated plugin as "totally new content element". At the quick glance your code should work.

-- 
Dmitry Dulepov
TYPO3 core team
Web: http://typo3bloke.net/
Skype: callto:liels_bugs
"Nothing is impossible. There are only limits to our knowledge"


More information about the TYPO3-english mailing list