从控制器中的FlexForms获取TYPO3插件设置 [英] Get TYPO3 Plugin settings from FlexForms in controller
问题描述
我有一个FE插件,它使用FlexForm MyExtFlexForm
,用于设置某些配置,例如 limit或SourcePage等.
在我的控制器动作 list
中,我使用 $ this->设置
来获得这些设置.到现在为止一切正常.
现在,我进行了AJAX调用以进行操作 update
,并且我需要使用之前通过FlexForm为本页上的FE插件设置的相同设置. $ this->设置不显示任何内容
.
我检查了 $ GLOBALS ['TSFE']-> tmpl-> setup ['plugin'] ['MyExt.'] ['settings.']
,但未定义任何设置在FlexForm中显示此处.
如何解决此问题?
我的示例Flexform如下所示:
< sheets>< sDEF>< ROOT>< TCEforms>< sheetTitle>查看设置</sheetTitle></TCEforms>< type> array</type>< el>< switchableControllerActions>< TCEforms>< label>选择</label>< config>< type>选择</type>< items>< numIndex index ="0">< numIndex index ="0"> MyFunction</numIndex>< numIndex index ="1"> MyExt-> list</numIndex></numIndex></items></config></TCEforms></switchableControllerActions>< settings.flexform.limit>< TCEforms><标签>要显示的项目数</label>< config>< type>输入</type>< size> 10</size></config></TCEforms></settings.flexform.limit></el></ROOT></sDEF></sheets>
然后我对控制器操作进行AJAX调用,并打印此 $ this->设置
,不显示任何设置.
我刚遇到一个解决方案: Then I make an AJAX call to my controller action and print this I just came across a solution: https://forum.typo3.org/index.php/t/194022/eigener-extbase-controller-keine-flexform-werte I was including the plugin like this: In order to load the settings correctly it should be:
这篇关于从控制器中的FlexForms获取TYPO3插件设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!$this->settings
, shows no settings. AJAX_PAGE = PAGE
AJAX_PAGE {
typeNum = 2
10 < tt_content.list.20.myPlugin
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
}
AJAX_PAGE = PAGE
AJAX_PAGE {
typeNum = 2
10 < styles.content.get
10 {
select.where = colpos = 0
select.andWhere = list_type='myPlugin'
}
config {
disableAllHeaderCode = 1
xhtml_cleaning = 0
admPanel = 0
debug = 0
no_cache = 1
}
}