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 matlab实现基于主成分变换的图像融合。
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊