首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >TYPO3 FlexForm没有出现

TYPO3 FlexForm没有出现
EN

Stack Overflow用户
提问于 2017-01-02 12:38:23
回答 2查看 1.2K关注 0票数 4

这是我的密码。我不知道哪里出错了?请重新填写以下代码,并帮助我

代码语言:javascript
复制
$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。你能帮我找出错误吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-01-02 13:00:16

必须将flexform字段添加到subtypes_addlist:

代码语言:javascript
复制
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
票数 3
EN

Stack Overflow用户

发布于 2017-01-02 13:00:31

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

这就是在这种方法中所发生的事情:

代码语言:javascript
复制
    $extensionName = str_replace(' ', '', ucwords(str_replace('_', ' ', $extensionName)));
    $pluginSignature = strtolower($extensionName) . '_' . strtolower($pluginName);

在我看来,这是不一样的:)

按照Rene的建议添加$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';也很重要。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41427016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档