在 Typo3 中,setup、constants 和 TSConfig 有什么区别 [英] In Typo3, what is the difference between setup, constants, and TSConfig

查看:24
本文介绍了在 Typo3 中,setup、constants 和 TSConfig 有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

似乎我可以在三个不同的地方编写 TypoScript:在模板中,有常量字段和设置字段,在每个页面中,都有一个 TSConfig 字段.然而,似乎每个 TypoScript 命令都需要进入一个特定的领域.大多数情况下,我必须在查找给定配置是否进入模板设置或根页面 TSConfig 之前尝试.

It seems there are three different places where I can write TypoScript: in templates, there is the constants field and the setup field, and in each page, there is a TSConfig field. However, it seems each TypoScript command need to go in a specific field. Most of the time, I have to try before finding if a given configuration goes into template setup, or in root page TSConfig.

为什么要在三个不同的地方编写 TypoScript?各有什么用?

Why are there three different places to write TypoScript? What is the use of each of them?

推荐答案

  • TSconfig 主要用于后端配置.你可以从表单中添加/更改/删除值,改变行为是什么样的记录用户可以添加,默认用户组等.请参阅 关于 TSconfig 了解更多信息详情.
  • 模板中的 Typoscript 用于更改前端行为、模板解析、扩展配置、导航等.模板中的 Typoscript 具有所谓的 cObjects,它提供有用的功能,如图像处理 (IMAGE)、从数据库获取记录 (RECORDS)),创建菜单 (HMENU),请参阅 TypoScript 参考.
  • Typoscript 常量很像变量,可以在模板 Typoscript 中使用.例如您的电子邮件地址出现在 Typoscript 模板中的许多不同位置,您可能希望将其定义为常量.有关详细信息,请参阅文档.
    • TSconfig is mainly for the backend configuration. You can add/alter/remove values from forms, change the behavior what kind of records users can add, default usergroups etc. see About TSconfig for more details.
    • Typoscript in the template is used to change the frontend behavior, template parsing, Extension configuration, navigation etc. Typoscript in the template has so called cObjects which provide useful functionality like Image manipulation (IMAGE), getting records from the database (RECORDS), creating menus (HMENU), see TypoScript Reference.
    • Typoscript constants are much like variables, which can be used within your template Typoscript. e.g. you have an email address which occurs in many different places within the Typoscript template, you might want to define it as constant. See documentation for more info.
    • 这篇关于在 Typo3 中,setup、constants 和 TSConfig 有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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