php - Typo3 - Typoscript condition -
im trying use condition on img_resource in datastructure. problem part not seem work:
the_img = img_resource the_img.if.equals.field = field_positiontype the_img.if.value = top the_img.file.xy = 200,150 the_img.file.import = uploads/tx_templavoila/ the_img.file.import.field = field_tabimage the_img.file.import.listnum = 0 the_img.file.maxw = 20 the_img.file.minw = 20 the_img.file.maxh = 15 the_img.file.minh = 15 the_img.file.params = -rotate 90 165 < the_img
no matter value of "field_positiontype" is, image build anyway. here snippet of data structure:
<field_positiontype type="array"> <tx_templavoila type="array"> <title>position</title> <sample_data type="array"> <numindex index="0"></numindex> </sample_data> <etype>select</etype> <typoscript></typoscript> <proc type="array"> <int>0</int> <hsc>1</hsc> <stdwrap></stdwrap> </proc> <preview></preview> </tx_templavoila> <tceforms type="array"> <label>position</label> <config type="array"> <type>select</type> <items type="array"> <numindex index="0" type="array"> <numindex index="0">left</numindex> <numindex index="1">left</numindex> </numindex> <numindex index="1" type="array"> <numindex index="0">right</numindex> <numindex index="1">right</numindex> </numindex> <numindex index="2" type="array"> <numindex index="0">top</numindex> <numindex index="1">top</numindex> </numindex> <numindex index="3" type="array"> <numindex index="0">bottom</numindex> <numindex index="1">bottom</numindex> </numindex> </items> <default>0</default> </config> </tceforms> </field_positiontype> <field_content type="array"> <tx_templavoila type="array"> <title>text</title> <sample_data type="array"> <numindex index="0"></numindex> </sample_data> <etype>rte</etype> <typoscript><![cdata[ the_img = img_resource the_img.if.equals.field = field_positiontype the_img.if.value = top the_img.file.xy = 200,150 the_img.file.import = uploads/tx_templavoila/ the_img.file.import.field = field_tabimage the_img.file.import.listnum = 0 the_img.file.maxw = 20 the_img.file.minw = 20 the_img.file.maxh = 15 the_img.file.minh = 15 the_img.file.params = -rotate 90 165 < the_img ]]></typoscript> <proc type="array"> <hsc type="integer">0</hsc> </proc> </tx_templavoila> <tceforms type="array"> <config type="array"> <type>text</type> <cols>48</cols> <rows>5</rows> </config> <label>text</label> <defaultextras>richtext:rte_transform[flag=rte_enabled|mode=ts_css]</defaultextras> </tceforms> </field_content>
try use img_resource's stdwrap-property:
the_img = img_resource the_img.stdwrap.if.equals.field = field_positiontype the_img.stdwrap.if.value = top
this should work, elbachata
Comments
Post a Comment