为什么我无法访问我的扩展程序'前端的设置?

时间:2015-02-26 00:34:44

标签: typo3 typoscript fluid extbase typo3-6.2.x

尝试访问我在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_,然后删除这两者的组合。

任何帮助将不胜感激! 感谢

1 个答案:

答案 0 :(得分:1)

  1. 对于带有密钥my_ext的分机,它应为plugin.tx_myext.settings
  2. 确保您从扩展程序中包含静态内容'在你的TypoScript模板中。如果列表中没有您的ext,请将其添加到ext_localconf.php中,如下所示:

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'MyExt');
    
  3. 不要忘记清除系统缓存 FE缓存至少百万次;)

  4. 使用TypoScript对象浏览器检查在给定页面上您的插件TS是否仍然可用(可能同时重置TS:

  5. enter image description here

    1. 最后确保您不要清除控制器中的$this->settings数组,如果您因任何原因操作它,请在查看渲染之前再将其分配给视图,如下所示:

      $this->view->assign('settings', $this->settings);