dpkt31779 2019-05-02 10:18
浏览 89

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
            }
        }
    }
}
  • 写回答

3条回答 默认 最新

  • dongmo9996 2019-05-02 10:36
    关注

    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.)
    评论

报告相同问题?

悬赏问题

  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线