[FLOW3-general] How to show a self defined selectbox in Fluid?

Stefan Frömken firma at sfroemken.de
Fri Dec 3 14:16:26 CET 2010


Hello at all,

in my db table I have some fields defined as select (to another table) 
and select (with self defined values). I have a problem with my self 
defined select fields:

$TCA['tx_ebsink_domain_model_ink']['columns']['inktype']['config'] = array(
	'type' => 'select',
	'items' => array(
	 
array('LLL:EXT:ebsink/Resources/Private/Language/locallang_db.xml:tx_ebsink_domain_model_ink.inktype.I.0', 
'0'),
	 
array('LLL:EXT:ebsink/Resources/Private/Language/locallang_db.xml:tx_ebsink_domain_model_ink.inktype.I.1', 
'1'),
	 
array('LLL:EXT:ebsink/Resources/Private/Language/locallang_db.xml:tx_ebsink_domain_model_ink.inktype.I.2', 
'2'),
	),
	'size' => '1'
);

so in db I only find 0, 1 or 2 and same in my frontend:

Inktype: 1

But I want:

Inktype: MEK

Is there a finnished function or viewHelper in ExtBase or Fluid?

If not...I think I have to generate this fields on my own like this:

<f:if condition="{ink.inktype} == 0">Acetone</f:if>
<f:if condition="{ink.inktype} == 1">MEK</f:if>
<f:if condition="{ink.inktype} == 2">Water</f:if>

But I think that this is not very dynamic. What do you think?

Stefan


More information about the FLOW3-general mailing list