What do we mean, when we use the word “TypoScript”?
- Everything, including TypoScript Templates (including constants and setup), the TypoScript syntax and TSconfig?
- TypoScript templates (as used in the Template Module and in .typoscript files in extensions)
- TypoScript syntax (as used in TSconfig and TypoScript templates setup and constants)
- Is TSconfig (a special kind of) TypoScript? (After all, the word TSconfig was probably derived from TypoScript config).
Main motiviation of having clear, unambiguous terms in the context of TypoScript and using them throughout the core and the documentation.
Writing good documentation means writing easy to understand, clear documentation. Using fuzzy terms (the same term with different meaning, depending on context) makes this more difficult.
I would prefer terms that always have the same meaning and not 1 term for several meanings for more clarity.
TypoScript influences many aspects of a TYPO3 site:
TypoScript can be used in the TSconfig field of a backend user or a backend user group or in the TSconfig field of a page. It will then change the look and behavior of forms in the backend .
The frontend rendering in contrast is defined by the TypoScript used in TypoScript templates. This document covers only frontend rendering."
– TypoScript in 45 minutes
Here, the word TypoScript actually means “TypoScript syntax” in part of the sentences and “TypoScript templates” in another. I think this might be confusing for beginners especially because TSconfig is not TypoScript (or at least TSConfig is not TypoScript Templates), but the TypoScript syntax is used there as well.
I think, if the TypoScript syntax were not used outside of TypoScript templates, e.g. in TSconfig and TypoScript constant syntax were not used in Extension configuration as well it would not be such a problem in the first place.
It’s like having another language that is not PHP but uses the same syntax as PHP (but a different set of functions) and then you call it PhPLang and than you have another weird syntax for header files with the comment defining the datatype.
Often, information about TypoScript covers both (syntax and templates).
Try to avoid the term TypoScript (without additional modifiers) entirely. Try to always use one of the following terms:
- TypoScript syntax: If used to describe the TypoScript syntax used in TypoScript templates and TSconfig
- TypoScript Template(s): For everything covering TypoScript Templates as used in the Template module, Configuration/TypoScript files, .typoscript files, TypoScript object browser etc.
In order to differentiate between constants and setup in TypoScript templates:
- TypoScript constants
- TypoScript setup
In order to differentiate between syntax for constants and other:
- “TypoScript syntax” (generally implies “TypoScript syntax for TypoScript setup” or TSconfig as opposed to constants), but “TypoScript setup syntax” can be used to stress this
- “TypoScript constant syntax”: syntax used for TypoScript constants and Extension configuration
You could argue, that TypoScript comment syntax and TypoScript syntax are the same. Well, mostly they are. But no.
- Rename TypoScript reference to “TypoScript Template Reference”
- Rename TypoScript in 45 minutes to “TypoScript Templates in 45 Minutes”
- (The chapter TypoScript Syntax in TYPO3 Explained can stay as is)
Please note, that the term “Template” is also ambiguous as has been pointed out in “TYPO3 in 45 minutes”. Well, let’s just do the best we can to be as clear as possible …