[TYPO3-dev] Switching flexform-DS based on cType?

JoH asenau info at cybercraft.de
Fri Jul 20 00:39:59 CEST 2007


>> Check the "icecore" extension.
>> Everything you need is in ext_tables.php, because I had to use
>> exactly this approach to add a flexform based GIFBUILDER setup to
>> the "ice_headergfx".
>
> thanks for the hint - but it doesn't work - and now I found out why.
> The switch for the DS of the field pi_flexform is related to the
> field 'list_type', but in my case I would need to switch based on the
> field 'CType'. And whoever integrated the flexform-configuration for
> TABLES implemented this DS as default DS for pi_flexform - so it
> appears always, besides in extensions.
>
> So now I would either have to add a custom field to the DB for my
> flexform or should try to find a way to set a value for the field
> 'list_type' if CType 'mailform' is selected. Any ideas how to do
> that?

Switch this one:

$TCA['tt_content']['columns']['pi_flexform']['config']['ds_pointerField'] =
'list_type';

to

$TCA['tt_content']['columns']['pi_flexform']['config']['ds_pointerField'] =
'CType';

and then add something like

$TCA['tt_content']['columns']['pi_flexform']['config']['ds']['mailform'] =
'myForm_flexform_ds.xml';

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com






More information about the TYPO3-dev mailing list