[TYPO3-dev] TCA, wsitch the look of a field but using the same field name
Ries van Twisk
typo3 at rvt.dds.nl
Sat Jun 3 17:26:19 CEST 2006
Jochen Rieger wrote:
>Hi Ries,
>
>
>
>>I don't want to bloat my record with many many fields I hardly use and
>>like to re-use the field content
>>under different conditions.
>>
>>
>
>yup, I understand you. But I think this is a problem of TCA
>configuration where it is not possible to have altering settings for ONE
>field. For cases like yours we would need a "switchable" configuration
>for that one field with a condition to be definable for this switch.
>
>Or just add many many fields that don't get used very often. I don't
>think that is a big problem... have a look at tt_content. There are many
>many fields that don't get used in the majority of its records.
>
>
Well, that's exacly my problem. I don't want to create fields in the
database that are used just 5% of the time.
My table is not well normalized already and I don't want to create more
fields like done in tt_content.
The field content is exacly for the perpose.. to put content in , no
matter what mode I am in.
I will keep the method I am using now for a while.
If I have time I can checkup to create a virtual fields array, something
like this:
"virtualField" => array(
"contentRTE" => "content",
"contentColorPicker" => "content",
)
This can tell the TCA in a later stage the the content for
contentColorPicker needs to be stored into the field content.
However I don't have much contact with core dev's to tell me this is a
good idea or not and can't efford testing and trying for +8 hours
and come to the conclusion it's a bad idea. Also the 'wheel' might be
invented already in Typo3 but I can't find it in the current documentations.
I will keep my ugly duck code for now.. it works perfectly anyways.
Ries
--
Ries van Twisk
Freelance Typo3 Developer
=== Private:
email: ries at vantwisk.nl
web: http://www.rvantwisk.nl/freelance-typo3.html
skype: callto://r.vantwisk
=== Work:
email: ries at livetravelguides.com
web: http://www.livetravelguides.com
More information about the TYPO3-dev
mailing list