TYPO3扩展设置到页面设置

时间:2019-04-02 17:50:21

标签: typo3 typoscript

我正在寻找解决方案,如何将“分机/插件”设置赋予页面设置?

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

page.10.settings =< plugin.tx_tester.settings

2 个答案:

答案 0 :(得分:1)

似乎您不能将TypoScript引用用于设置,而只能用于cObject。

从TypoScript文档中:

  

仅对 Content Objects 解析引用,否则不解析引用。例如,您不能使用引用< 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

答案 1 :(得分: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
   }
}
相关问题