dongmu1914 2018-01-17 09:24
浏览 46
已采纳

TYPO3 TCA语法到FlexForm语法

I have the following xml: (Not my complete XML. After the selection, i have defined some settings, like OrderBy, pid etc )

<el>
<switchableControllerActions>
<TCEforms>
    <label>Select function</label>
    <onChange>reload</onChange>
    <config>
        <type>select</type>
        <items>
            <numIndex index="0">
                <numIndex index="0">List View</numIndex>
                <numIndex index="1">MyExt->list;MyExt->show</numIndex>
            </numIndex>
            <numIndex index="1">
                <numIndex index="0">Detail View</numIndex>
                <numIndex index="1">MyExt->show</numIndex>
            </numIndex>
            <numIndex index="5">
                <numIndex index="0">Import</numIndex>
                <numIndex index="1">--div--</numIndex>
            </numIndex>
            <numIndex index="10">
                <numIndex index="0">User Import</numIndex>
                <numIndex index="1">MyExt->import</numIndex>
            </numIndex>
        </items>
        <types>
            <numIndex index="0">
                <showItem index="0">orderBy</showItem>
                <showItem index="1">orderBy</showItem>
            </numIndex>
        </types>
    </config>
</TCEforms>
<switchableControllerActions>
</el>

What i would like to do, is to specify some settings to each view without these settings to be applicable to every view. For example, on the list view, i would like to have the setting "Page for the single view" but not on the detail or import view. I found this documentation: Documentation but i have difficulties to convert it to FlexForm syntax.

Any help is appreciated.

EDIT:

After @Bernd Wilke πφ showed me the right direction i found the solution to my problem. This is it:

<pidSingle>
  <TCEforms>
    <label>Page for the single views</label>
    <displayCond>FIELD:switchableControllerActions:=:MyExt->list;ImmobilieImport->show</displayCond>
    <config>
     <type>input</type>
     <eval>trim</eval>
    </config>
  </TCEforms>
</pidSingle>
  • 写回答

1条回答 默认 最新

  • du5407 2018-01-17 09:36
    关注

    you need diplayconditions for your specific settings.

    <pidSingle>
        <TCEforms>
            <label>Page for the single views</label>
            <displayCond>FIELD:el:=:1</displayCond>
            <config>
                <type>input</type>
                <eval>trim</eval>
            </config>
        </TCEforms>
    </pidSingle>
    

    see the manual

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

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料