TYPO3 - 扩展插件的拼写错误

TYPO3 - typoscript for extension plugin

我只想在带有特定插件的页面上执行一些打字错误命令:

page.includeCSS { }
page.includeJS { }
lib.my_bloc = COA
etc...

我将打字错误代码移到文件 typo3conf/ext/my_company_plugin/Configuration/TypoScript/setup.txt 中,但它似乎不起作用。如何让它发挥作用?

此外,我无法为我的模块设置默认的 storagepid。我希望所有新实体都存储在同一个特定文件夹中(顺便说一句,uid 184)但是我的 TS 进入 setup.txt 无效并且数据库中的 pid 是用户所在的页面,而不是 184。

#constant
module.tx_company_events.persistence.storagePid = 184

#setup
module.tx_company_events.persistence.storagePid = {$module.tx_company_events.persistence.storagePid}

如果您想为特定页面插件添加错别字,那么您可以使用如下的错字条件。

// if get your plugin parameters then below typoscript works
[globalVar = GP:tx_extension_key|var1 > 0]
  // write your typoscript
  page.includeCSS { }
  page.includeJS { }
  lib.my_bloc = COA
[end]

// FOr specific pageId
[globalVar = TSFE:id = 10]
  page.includeCSS { }
  page.includeJS { }
  lib.my_bloc = COA
[end]

另外,对于 StoragePid,请确保您在 Root 模板中包含了来自分机的 TypoScript。