在TYPO3 CMS中调试Typoscript的最佳方式是什么? [英] What is the best way to debug Typoscript in TYPO3 CMS?

查看:184
本文介绍了在TYPO3 CMS中调试Typoscript的最佳方式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



假设我有一个列表,没有显示 -
什么是策略?

在TYPO3 CMS中调试typoscript的最佳方式是什么?寻找问题?

解决方案

调试Typoscript不是最舒适的任务,但有几种可能性。以下是最常见的技术:




  • 在后端使用TS对象浏览器:选择Web>模板模块,然后从你需要调试的pagetree。如果有明显的语法错误或冗余/缺少的方括号,将显示错误信息。在常量设置之间切换,并广泛使用搜索字段。在您的示例中,如果您的TypoScript对象被命名为mylistview ,请搜索 myListview 参数。

  • 在后端(也可以在模板模块中)使用模板分析器:它类似于对象浏览器,但模板分析器为您提供了宝贵的见解。错误(或警告)确切地被发现。

  • 将您的Typoscript设置(+常量)外包给文件,然后在您喜欢的文本编辑器中使用语法荧光笔。你会得到一个更好的概述,突出显示有助于避免拼写错误。例如:


  • 激活管理面板,并使用TypoScript部分。它显示您选择的render(config)值,SQL查询,错误消息等。但是,它不完整,我没有经常使用它,所以我也很想知道更多关于它。

  • 使用 stdWrap.debugFunc 函数包装您的Typoscript对象,或使用内置 debugItemConf MENU 对象的c $ c>方法。调试输出将在前端看到。 阅读更多在TYPO3维基

  • 最多常见错误(除了打字错误)是错误的文件路径,不存在的HTML模板或修改后的模板中缺少的子部分。另外,忘记为扩展包含静态模板可能会让中间用户困惑不解。作为起点:)。



希望有帮助,请在评论中发布任何补充。


What is the best way to debug typoscript in the TYPO3 CMS?

Assuming I have a list, which is not displayed - what is the strategy to look for the issue?

解决方案

Debugging Typoscript is not the most comfortable task, but there are several possibilities. Here are the most common techniques:

  • Use the TS Object Browser in the backend: Choose the Web > Template module, then pick the page from the pagetree you need to debug. If there are any obvious syntax errors or redundant/missing brackets, an error message will be displayed. Switch between constants and setup and use the search field extensively. In your example, search for the myListview parameter if your TypoScript object is named myListview.
  • Use the Template Analyzer in the backend (also in Template module): It's similar to the Object Browser, but the Template Analyzer gives you valuable insights where in your setup the errors (or warnings) exactly are that have been spotted.
  • Outsource your Typoscript setup (+ constants) to files, then use a syntax highlighter in your favorite text editor. You get a better overview and the highlighting helps to avoid misspellings. For example:
  • Activate the admin panel in the frontend and use the section "TypoScript". It shows you selected rendered (config) values, SQL queries, error messages and more. However, it's not complete and I'm not using it frequently so I am also keen on knowing more about it.
  • Wrap your Typoscript objects with the stdWrap.debugFunc Function or use the build-in debugItemConf method for all MENU objects. Debug output will be seen in the frontend. Read more in the TYPO3 Wiki
  • Most common errors (apart from typos) are wrong file paths, non-existing HTML-templates or missing subparts in modified templates. Also, forgetting to include static templates for an extension might leave the intermediate user puzzled. Just as a starting point :).

Hope that helps, please post any additions into the comments.

这篇关于在TYPO3 CMS中调试Typoscript的最佳方式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆