[Typo3] "CODE:" field in Extension

JoH info at cybercraft.de
Thu Apr 28 11:09:21 CEST 2005


> change the line
>
$TCA["tt_content"]["types"]["list"]["subtypes_excludelist"][$_EXTKEY."_pi1"]
="layout,select_key";
> to
>
$TCA["tt_content"]["types"]["list"]["subtypes_excludelist"][$_EXTKEY."_pi1"]
="layout";
> in ext_tables.php
> and the code field will be shown after clearing the ext_ cache
>
> it can be found via $this->cObj->data['select_key']

But ti still would be much better to leave it as a select key. Why?
Well - in a CODE field you can make spelling mistakes or write whatever you
like.
With a selectbox you are forced to choose from the available options.
You don't have to use flexforms but you definitely should not use text input
fields for this purpose, be it in Flexforms or standard BE forms.
Another advantage of select keys: You can use simple integers in the
DB/Flexform and give them different labels in different Elements. This will
keep DB entries as small as possible while giving you a maximum of
flexibility.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list