Question

In Flexform I have a tree view where I can select categories for my product. But it shows all three languages. It should only show the language that is the same as the element language.

What did I miss?

<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>

Was it helpful?

Solution

Here is a snippet that only shows the foreign entries of the same language.

<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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top