I have a FE Plugin which uses a FlexForm MyExtFlexForm which is used to set certain configurations like limit or SourcePage etc..
In my controller action list I get these settings using $this->settings. Works fine till now.
Now, I make AJAX calls to action update and I need to use the same settings which have been set earlier through the FlexForm for the FE plugin on this page. $this->settings does not show anything.
I checked $GLOBALS['TSFE']->tmpl->setup['plugin']['MyExt.']['settings.'] and none of the settings defined in FlexForm show here.
How do I solve this issue?
EDIT:
My sample Flexform looks like this:
<sheets>
<sDEF>
<ROOT>
<TCEforms>
<sheetTitle>View Settings</sheetTitle>
</TCEforms>
<type>array</type>
<el>
<switchableControllerActions>
<TCEforms>
<label>Select</label>
<config>
<type>select</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>Number of items to be displayed</label>
<config>
<type>input</type>
<size>10</size>
</config>
</TCEforms>
</settings.flexform.limit>
</el>
</ROOT>
</sDEF>
</sheets>
Then I make an AJAX call to my controller action and print this $this->settings , shows no settings.
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:
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
}
}
In order to load the settings correctly it should be:
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
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With