TYPO3扩展设置到页面设置

问题描述 投票:0回答:2

我搜索一个解决方案,如何将Ext / Plugin设置提供给页面设置?

我的第一个测试不起作用:

page.10.settings =< plugin.tx_tester.settings
typo3 typoscript
2个回答
1
投票

您似乎无法使用TypoScript引用进行设置,但仅适用于cObjects。

从TypoScript文档:

仅针对内容对象解析引用,否则不解析引用。例如,您不能使用引用< plugin.tx_example.settings.foo来查找foo的值。你获得的价值将只是< plugin.tx_example.settings.foo

提供的示例显示了复制运算符<,但我认为这是文档中的拼写错误。


资料来源:https://docs.typo3.org/typo3cms/TyposcriptSyntaxReference/8.7/Syntax/TypoScriptSyntax/Index.html#references-the-sign


0
投票

没有page.10.settingshttps://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Page/Index.html#

你的意思是:

page = PAGE
page {
   10 = FLUIDTEMPLATE
   10 {
      file = EXT:site_default/Resources/Private/Templates/MyTemplate.html
      settings {
         copyrightYear = 2013
      }
   }
}

https://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Fluidtemplate/Index.html?highlight=settings#settings

然后这应该工作

page = PAGE
page {
   10 = FLUIDTEMPLATE
   10 {
      settings < plugin.tx_tester.settings
   }
}
© www.soinside.com 2019 - 2024. All rights reserved.