duaeim2874 2011-02-18 12:00
浏览 35
已采纳

Typo3 - Typoscript条件

Im trying to use a condition on an IMG_RESOURCE in my datastructure. But the problem is that this part does not seem to 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 what the value of "field_positiontype" is, the image is build anyway. Here are a snippet of my 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>
  • 写回答

1条回答 默认 最新

  • doutan5724 2011-02-25 09:13
    关注

    Try to use the 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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 请问如何在openpcdet上对KITTI数据集的测试集进行结果评估?
  • ¥15 powerbuilder中的datawindow数据整合到新的DataWindow
  • ¥20 有人知道这种图怎么画吗?
  • ¥15 pyqt6如何引用qrc文件加载里面的的资源
  • ¥15 安卓JNI项目使用lua上的问题
  • ¥20 RL+GNN解决人员排班问题时梯度消失
  • ¥60 要数控稳压电源测试数据
  • ¥15 能帮我写下这个编程吗
  • ¥15 ikuai客户端l2tp协议链接报终止15信号和无法将p.p.p6转换为我的l2tp线路
  • ¥15 phython读取excel表格报错 ^7个 SyntaxError: invalid syntax 语句报错