尝试访问我在constants.txt
文件中创建的一些设置。它看起来像这样:
plugin.tx_my_ext {
settings {
# cat=plugin.tx_my_ext/urgences; type=boolean; label=Activer les urgences
activerUrgences = 0
}
}
然后在我的setup.txt
文件中,我有这个:
plugin.tx_my_ext.settings.activerUrgences = {$plugin.tx_my_ext.settings.activerUrgences}
为什么我无法在流体布局中使用{settings}
访问我的设置?
BTW,我的扩展名在单词之间包含一个下划线_
。我尝试删除下划线,然后删除tx_
,然后删除这两者的组合。
任何帮助将不胜感激! 感谢
答案 0 :(得分:1)
my_ext
的分机,它应为plugin.tx_myext.settings
确保您从扩展程序中包含静态内容'在你的TypoScript模板中。如果列表中没有您的ext,请将其添加到ext_localconf.php
中,如下所示:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MyExt');
不要忘记清除系统缓存和 FE缓存至少百万次;)
使用TypoScript对象浏览器检查在给定页面上您的插件TS是否仍然可用(可能同时重置TS:
最后确保您不要清除控制器中的$this->settings
数组,如果您因任何原因操作它,请在查看渲染之前再将其分配给视图,如下所示:
$this->view->assign('settings', $this->settings);