dongmu1914 2018-01-17 01: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 01: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

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

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部