我正在使用TYPO3 7.6.14版本,并且为客户端创建了一个扩展,它有四个控制器,四个插件以及相当大的整体。无论如何,现在我需要为动态或用户选择的“页面ID”添加选项(设置变量),然后用于从一个插件重定向到另一个插件。有可能是我的问题更好的解决方案,但我想这样做:
plugin.tx_extname_basket {
view {
# cat=plugin.tx_extname_basket/file; type=string; label=Path to template root (FE)
templateRootPath = EXT:extname/Resources/Private/Templates/
# cat=plugin.tx_extname_basket/file; type=string; label=Path to template partials (FE)
partialRootPath = EXT:extname/Resources/Private/Partials/
# cat=plugin.tx_extname_basket/file; type=string; label=Path to template layouts (FE)
layoutRootPath = EXT:extname/Resources/Private/Layouts/
}
persistence {
# cat=plugin.tx_extname_basket//a; type=string; label=Default storage PID
#storagePid =
}
settings {
# cat=plugin.tx_extname_basket//a; type=int; label=Products Page ID
productsPage =
}
}
现在的问题是,即使我100%肯定的TypoScript正确纳入其中扩展加载页面,变量$this->settings['productsPage']
和FLUID {settings.productsPage}
不起作用。我清除了整个缓存,甚至试图删除整个typo3temp文件夹,它仍然无法正常工作。我也试过调试$this
对象,它说settings => NULL
。
哦productsPage被输入默认的根模板下的“设置”,并浏览Typo脚本对象时(行政)我可以看到设置就好了设置。所以我不认为我有无效的TypoScript。
感谢您的回复。我知道我必须为每个插件添加设置,我已经粘贴了四分之一的示例。抱歉不清除。我只关心在控制器和流体中获得$ this->设置。我也更新了来自对象浏览器的图像问题。 –
常量在您的输入框中不能自动提供。这就是保罗所描述的。 –
我明白了。谢谢,这固定了问题是的。 –