Typo3 eID,如何访问配置
我刚刚在 Typo3 中创建了一个 eID。我不知道如何从 Typo3 实例访问我的插件的配置数据。
我已经尝试过链接中的代码,但它不起作用。我在调用“ $TSFE->getConfigArray(); ”时不断收到异常“未找到 TypoScript 模板!”
http://lists.typo3.org/pipermail/typo3-dev/2006-December/021392.html
任何想法?
谢谢。
I've just created an eID in Typo3. I can't figure out how to access the config data for my plugin from the Typo3 instance.
I've tried the code from the link but it doesn't want to work. I keep getting an exception "No TypoScript template found! " on the call " $TSFE->getConfigArray(); "
http://lists.typo3.org/pipermail/typo3-dev/2006-December/021392.html
Any ideas?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 eID 模式下,仅加载常规 TYPO3 前端的一小部分。不幸的是 TypoScript 没有加载。要仍然访问 TypoScript 配置,您需要手动加载所需的组件。不幸的是,这可能会让人有点痛苦。因此,在某些情况下,加载包含单个插件的页面可能会更容易,该插件不包含任何其他内容(没有标题等)。
如果您确实想自己加载 TypoScript 模板,可以尝试如下操作:
这会初始化 TSFE 和 cObj,但也用于加载和解析 TypoScript 模板。您可能需要进行一些修改(可能删除一些内容)
代码来自以下博客文章的评论之一:http://sebastiaandejonge.com/blog/articles/2010/september/21/bringing-ajax-to-your-frontend-plugins/
祝你好运!
In eID mode, only a small part of the regular TYPO3 frontend is loaded. Unfortunately TypoScript is not loaded. To still access the TypoScript configuration you need manually load the components it needs to do so. Unfortunately this can be a bit of a pain in the butt. So in some cases it might be easier to just load a page containing a single plugin that doesn't contain anything else (without headers etc.).
If you do want to load the TypoScript templates yourself, you can try something like the following:
This initializes the TSFE and cObj but is also used to load and parse the TypoScript templates. You might need to make some modifications to (probably kick some things out)
The code came from one of the comments on the following blog post: http://sebastiaandejonge.com/blog/articles/2010/september/21/bringing-ajax-to-your-frontend-plugins/
Good luck!