TYPO3 FlexForm没有出现

萨米尔·巴亚尼(Samer Bhayani)

这是我的代码。我不知道哪里出了错?请参考以下代码并帮助我

$pluginSignature = str_replace('_','',$_EXTKEY) . '_rock';

\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin( 'Rocktechnolabs.' . $_EXTKEY, 'rock', 'THE FAQS' );

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/flexform_rock.xml');

in Configuration/FlexForms/flexform_rock.xml

<T3DataStructure>
    <sheets>
        <sDEF>
            <ROOT>
                <TCEforms>
                    <sheetTitle>Function</sheetTitle>
                </TCEforms>
                <type>array</type>
                <el>
                    <switchableControllerActions>
                        <TCEforms>
                            <label>Select function</label>
                            <config>
                                <type>select</type>
                                <items>
                                    <numIndex index="0">
                                        <numIndex index="0">List</numIndex>
                                        <numIndex index="1">Faq->list</numIndex>
                                    </numIndex>
                                    <numIndex index="1">
                                        <numIndex index="0">Search</numIndex>
                                        <numIndex index="1">Faq->search</numIndex>
                                    </numIndex>
                                </items>
                            </config>
                        </TCEforms>
                    </switchableControllerActions>
                </el>
            </ROOT>
        </sDEF>
    </sheets>
</T3DataStructure>

我尝试了很多,但是在选择插件期间没有得到flexform。您能帮我找出错误吗?

RenéPflamm

您必须将flexform字段添加到subtypes_addlist中:

$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章