替代 TYPO3 v13+ 中的 includeStaticTypoScriptSourcesAtEnd 的选项:

huangapple go评论70阅读模式
英文:

Replacement for includeStaticTypoScriptSourcesAtEnd for TYPO3 v13+

问题

我使用TemplateService类提供的includeStaticTypoScriptSourcesAtEnd钩子来创建我所有的TYPO3框架。它的作用是动态加载网站的TypoScripts(一个是为整个站点,另一个是为特定页面层次结构的主题,具体取决于页面上的设置,通过TemplateService钩子实现)。

在TYPO3版本13中,TemplateService已经被停用,没有进一步的信息。这是非常重要的。它的新实现是什么?

英文:

I use includeStaticTypoScriptSourcesAtEnd hook which came with the TemplateService class to create all my TYPO3 frameworks. What it does is, it loads TypoScripts dynamically for the site (one for the whole site and another as theme for particular page hierarchies depending on the setting on the page, through a TemplateService hook.

The TemplateService is discontinued with no further information in TYPO3 version 13. It is of immense importance. What is its new implementation?

答案1

得分: 1

你可以尝试使用事件 "AfterTemplatesHaveBeenDeterminedEvent" 来替代。这并不是对你的挂钩的一对一替代,而是另一个选择。它应该让你伪造包含你的文件的 sys_template 行。

文档链接: https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Events/Events/Core/TypoScript/AfterTemplatesHaveBeenDeterminedEvent.html

英文:

I guess you should be able to use the Event "AfterTemplatesHaveBeenDeterminedEvent" instead. It is not an 1:1 replacement for your hook but another one. It should let you fake the sys_template rows that would include your files.

Documentation: https://docs.typo3.org/m/typo3/reference-coreapi/12.4/en-us/ApiOverview/Events/Events/Core/TypoScript/AfterTemplatesHaveBeenDeterminedEvent.html

huangapple
  • 本文由 发表于 2023年6月26日 16:35:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/76554938.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定