小编Jac*_*hec的帖子

TYPO3问题与Typoscript和访问$ this->设置

我正在使用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 =
    }
}
Run Code Online (Sandbox Code Playgroud)

现在的问题是,即使我100%确定Typoscript被正确地包含在加载扩展的页面中,变量$this->settings['productsPage']和FLUID {settings.productsPage}也不起作用.我清除了整个缓存甚至尝试删除整个typo3temp文件夹,它仍然无法正常工作.我也试过调试$this对象,它说settings => NULL.

对象浏览器中的图像

哦,productsPage是在"SETUP"下的Default Root模板中输入的,当浏览Typoscript对象时(在管理中)我可以看到设置设置就好了.所以我认为我没有无效的TypoScript.

php typo3 typoscript

3
推荐指数
1
解决办法
378
查看次数

标签 统计

php ×1

typo3 ×1

typoscript ×1