如何在Typo3中一次将一个插件添加到多个页面并判断要使用的操作

发布于 2025-02-03 02:49:08 字数 183 浏览 4 评论 0原文

我有一个带有插件的扩展程序的Typo3安装。

我想通过Typoscript将插件添加到一个页面,该页面中的所有子页面也应该具有它。 我只找到使用 switchableControllerActions 的代码片段,但据我所知,这是不建议的。

我该如何告诉页面中的插件哪个操作是要使用的操作?

I have a typo3 installation with one extension that has a plugin.

I want to add the plugin to one page via typoscript and all subpages in that page tree should have it as well.
I only find code fragments that use switchableControllerActions but this is deprecated, as far as I can see.

How can I tell the plugin in the page which action is the action to use?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过潦 2025-02-10 02:49:08

这些片段处理SwitchableControllerRactions如果您已经在扩展程序中分开插件,则可以忽略。

lib.insertPlugin = USER
lib.insertPlugin {
  userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
  vendorName = myVendor
  pluginName = MyPlugin
  extensionName = MyExtension

  settings =< plugin.tx_myExtension.settings
  persistence =< plugin.tx_myExtension.persistence
  view =< plugin.tx_myExtension.view

  settings {
    // ...
  }
}

该插件将使用其默认操作(除了请求中定义了另一个操作,例如,按照链接提交表单,...)。

配置参数第一行的操作列表中的第一个操作是插件的默认操作。 ( - &gt; \ typo3 \ cmms \ extbase \ utility \ extensionutility :: configureplugin()

These fragments handling switchableControllerActions can be ignored if you have already separated plugins in your extension.

lib.insertPlugin = USER
lib.insertPlugin {
  userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
  vendorName = myVendor
  pluginName = MyPlugin
  extensionName = MyExtension

  settings =< plugin.tx_myExtension.settings
  persistence =< plugin.tx_myExtension.persistence
  view =< plugin.tx_myExtension.view

  settings {
    // ...
  }
}

The plugin will use its default action (except, there is another action defined in the request, e.g. by submitting a form, following a link,...).

The first action in the action list of the first line of the configuration parameter is the default action of the plugin. (-> \TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin())

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文