In Typo3, what is the difference between setup, constants, and TSConfig

岁酱吖の 提交于 2021-01-21 04:15:08

问题


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.

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


回答1:


  • 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.


来源:https://stackoverflow.com/questions/5033306/in-typo3-what-is-the-difference-between-setup-constants-and-tsconfig

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!