[TYPO3-core] RFC: Feature #6770: Implement option to use different Flexform Datastructures per type field value

Ingmar Schlecht ingmar at typo3.org
Tue Nov 20 10:59:01 CET 2007


Hi Masi,

Martin Kutschker schrieb:
> Ingmar Schlecht schrieb:
>> This is an SVN patch request.
>>
>> Type: New feature
>>
>> Bugtracker references:
>> http://bugs.typo3.org/view.php?id=6770
>>
>> Branch: trunk
>>
>> Problem:
>> Currently it's not possible to make tceforms use different Flexform
>> datastructures for the pi_flexform field based on the Content Type
>> (CType) of the tt_content table because the plugin field ("list_type")
>> is already defined to be the ds_pointerfield in this case.
>>
>> However, to have Flexform configuration for the "table" and "login"
>> Content Elements as well, it is necessary to optionally define different
>> DataStructures per CType.
>>
>> Solution:
>> Introduces the new TCA option "ds_altSrcPointer_perType" to flexform
>> fields.
> 
> I see the problem and I stumbled upon it also, but I don't like the
> solution.
> 
> My proposal: extend the syntax for ds_pointerField.
> 
> The new syntax is 'type1:subtype1[,type2:subtype2 ...]'. 

I don't get the above example. Is that what's in the keys of the 'ds'
array, or is that a possible value for 'ds_pointerfield'?

> Within the
> flexform the key is type:subtype with an excpetion for the first type.
> Subtypes of the very first type can be set in the data structure without
> the type (to be compatible).

Like this?

'ds_pointerfield' => 'list_type,CType',
'ds' => array(
	'auxdataviewer_pi1' => 'FILE:EXT:auxdataviewer/pi1/flex.xml',
	'list_type:,CType:table' => 'FILE:EXT:csc/flex.xml',
	'list_type:tt_address_pi1,CType:list' => 'FILE:EXT:.../...xml',
),

The only downside would be that the ds definition for CType:table would
break if for some reason the list_type field would not be empty.

cheers
Ingmar

-- 
Ingmar Schlecht
TYPO3 Association Active Member


More information about the TYPO3-team-core mailing list