[TYPO3-mvc] FlexForm Values

Franz Koch typo3.RemoveForMessage at elements-net.de
Thu Sep 2 13:55:21 CEST 2010


Hey Thomas,

> I have a new problem with ExtBase.

not for long ;)

> I have added a flexform to my plugin (which was difficult enough!!!)
> with a single field.
> As far as I know, the flexform data should be merged into the settings
> property of the controller, right?
>
> Well, that does not happen!

In extbase you can not only merge flexform values to the settings array 
but also to any other namespace (otherwise you could not set default 
actions). In order to achieve this, you have to give you flexform fields 
a name that's reflecting the full TS path.

Example:
You have the following TS setting and like to override it from the flexform:

TS: plugin.tx_yourext.settings.whatever.myField = 0

Flexform: <settings.whatever.myField>


easy as that. And if you like to change the default 
action/switchableControllerActions, simply call your flexform field 
<switchableControllerActions>, because those are defined in "root" level 
of your plugin configuration and don't need a prefix.

But please note, that flexform fields that should be mapped to TS will 
ALWAYS override your TS settings - so even if the flexform field is 
empty, your default TS will be overwritten by that empty value. There 
has been a discussion to only overwrite nonempty values - but there are 
some other issues with this (like not beeing able to explicitly set a 
value to ''). IIRC there's also a ticket on forge for this.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list