繁体   English   中英

TYPO3 FlexForm没有出现

[英]TYPO3 FlexForm is not appearing

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

$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。 你能帮我找出错误吗?

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

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

确保你的 $pluginSignatureExtensionUtility::registerPlugin()$pluginSignature结果相匹配。

这就是该方法中发生的事情:

    $extensionName = str_replace(' ', '', ucwords(str_replace('_', ' ', $extensionName)));
    $pluginSignature = strtolower($extensionName) . '_' . strtolower($pluginName);

对我来说,这看起来不同:)

添加$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; 正如雷内所说的那样重要。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM