[TYPO3] "totally new Content Element type" extensions

John Nicholas typo3user at mobosplash.com
Tue Feb 14 21:44:48 CET 2006

Christian Trabold wrote:
> Hello John,
>> I am trying to write an extension that is top level content type like 
>> the "text" or "text with image" content type.
> [...]
>> The ext_tables.php file has this:
>> t3lib_div::loadTCA("tt_content");
>> $TCA["tt_content"]["types"][$_EXTKEY."_pi1"]["showitem"]="CType;;4;button;1-1-1, 
>> header;;3;;2-2-2";
>> which looks like I could just add new fields to the string to add more 
>> fields similar to the way the tca controls list style plugins but it 
>> doesn't seem to have any effect.
>> Any advice is appreciated.
> My advice: Go ahead an change the "Kickstarter generated code" untill it 
> fits your needs ;)
> You can add nearly every field from the tt_content table (exept uid, pid 
> and other "system" fields that you *must not* edit).
> The syntax to do so is slightly "strange" so you might want to find 
> hints here:
> http://typo3.org/documentation/document-library/doc_core_api/types_key_secti/ 

Yes, i am familiar with this from writing extensions that are like the 
one demonstrated in the "Frontend Plugin Development" videos. In this 
case, I am not doing the same kind of plugin. Instead of the default 
"Add to 'Insert Plugin' list in Content Elements" option under Front End 
Plug-ins in the kickstarter I am selecting "Add as a totally new Content 
Element type". My goal is to create a single content element with 
content similar to the Text or Text/w Image content types rather than a 
list of items in the List view.

While the above looks similar to info on the page you linked to, it does 
not appear to work the same way. I would expect to change the above php 
line to

header;;3;;2-2-2, bodytext;;5;;2-2-2";

and have the text area show up under the header but nothing shows up.

The only obvious difference that I see is that in the other kind of 
plugin the line is like this:

$TCA["tt_content"]["types"][0]["showitem"] = ...
rather than
$TCA["tt_content"]["types"][$_EXTKEY."_pi1"]["showitem"]  = ...

but I'm not sure how the [$_EXTKEY."_pi1"] relates to the numbers in my 
previous plugins.

More information about the TYPO3-english mailing list