TYPO3 8.7.x / Typoscript:扩展ajax调用,从插入特定页面的插件中获取设置

I have an extension containing a action for an ajax call, which returns a json string. There is also a plugin inserted on a specific page for the user input. The plugin has some settings (via flexform), which I want to get at the ajax call, but I have no idea how.

ajaxCall = PAGE
ajaxCall {
    typeNum = 1000
    config {
        disableAllHeaderCode = 1
        metaCharset = UTF-8
        no_cache = 1
        debug = 0
    }

    10 = USER
    10 {
        userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
        vendorName = Vendor
        pluginName = SomePlugin
        extensionName = SomeExtension
        controller = MyController
        action = ajax
        switchableControllerActions {
            MyController {
                1 = ajax
            }
        }
    }
}

I see two possibilities to solve your problem:

  1. put the uid of the plugin (which is a content element and so represented by a record in the table tt_content) in the parameters of your call to the controller so the controller can read that record and get the data.

or

  1. instead of a call to the controller render the plugin explicitly.
    Depending on the configuration of the page where the plugin is stored you might render the whole page, column or only the content element. (use the CONTENT object in your typoscript.)

Thanks, I tried something like 2. but I've got the problem, that I get also the headline and the wrap, which is unpractical for a json output

....
#page Type 1000
10 = CONTENT
10 {
    table = tt_content
    select {
        where = list_type="someextension_someplugin"
    }
...

That is a perfect use case for https://extensions.typo3.org/extension/typoscript_rendering/ Create a link to the action you want to call via Ajax using the delivered view helper and your action renders exactly as expected (including flexform content being respected).