TYPO3 - 如何仅在FlexForm中显示正确的语言

时间:2013-11-22 09:03:42

标签: typo3 typo3-tca

在Flexform中我有一个树形视图,我可以在其中为我的产品选择类别。但它显示了所有三种语言。它应该只显示与元素语言相同的语言。

我错过了什么?

<T3DataStructure>
<meta type="array">
    <langChildren type="integer">0</langChildren>
    <langDisable type="integer">1</langDisable>
</meta> 
<sheets>
    <main>
        <ROOT>
            <TCEforms>
                <sheetTitle>Options</sheetTitle>
            </TCEforms>
            <type>array</type>
            <el>
                <settings.flexform.showCategory>
                    <TCEforms>
                        <exclude>1</exclude> 
                        <label>Vælg kategori 1:</label>
                        <config>
                            <type>select</type>
                            <renderMode>tree</renderMode>
                            <treeConfig>
                                <parentField>maincategory</parentField>
                                <appearance>
                                    <expandAll>FALSE</expandAll>
                                    <showHeader>TRUE</showHeader>
                                </appearance>
                            </treeConfig>
                            <size>10</size>
                            <minitems>0</minitems>
                            <maxitems>999</maxitems>
                            <autoSizeMax>5</autoSizeMax>
                            <multiple>0</multiple>
                            <foreign_table>tx_origproducts_domain_model_category</foreign_table>
                                <!-- ###STORAGE_PID### is set by the field GENERAL STORAGE PAGE on the page record - or a parent page record to affect a hole branch -->
                            <foreign_table_where></foreign_table_where>
                            <size>10</size>
                            <items type="array">
                                <numIndex index="100">
                                    <numIndex index="0">Alle</numIndex>
                                    <numIndex index="1">-1</numIndex>
                                </numIndex>
                            </items>                        
                        </config>
                    </TCEforms>
                </settings.flexform.showCategory>
            </el>
        </ROOT>
    </main>s
</sheets>

1 个答案:

答案 0 :(得分:5)

这是一个仅显示相同语言的外来条目的片段。

<foreign_table_where>AND (sys_language_uid=CAST('###REC_FIELD_sys_language_uid###' AS UNSIGNED) OR sys_language_uid = '-1') AND tx_origproducts_domain_model_category.deleted = 0 AND tx_origproducts_domain_model_category.hidden = 0</foreign_table_where>