For both "TypoScript constants" and "Extension Configuration" (as defined in ext_conf_template.txt) use a common syntax. They are documented here:
An example:
# cat=basic; type=string; label=Some title
title =
Line 1 describes data type, category etc. of the variable.
Alternatively, we might have something like this:
tx_plugins.my_plugin {
# cat=basic; type=string; label=Some title
title =
}
Besides this rather simple example, there are some more things you can do with this.
Where TypoScript constants and Extension Configuration are stored and how they are used is completely different, but I am wondering if we just look at the syntax and the features you can use - is it the same?
e.g.
The reason I ask: To streamline the documentation and also I use this in my own extensions.
The syntax used for TS template constants and extension configuration is the same but there are some minor differences for the available types currently.
For TYPO3 CMS version 6 the extension manager and configuration was rewriten from scratch based on Extbase and using the FormEngine. Available types are:
int
: integer valuesint+
: positive integer values onlyinteger
: alias for int
color
: color pickerwrap
: wrap, lines are separated finally by |
for the saved valueoffset
: offset fieldoptions
: selectboolean
: checkboxuser
: user function is used for renderingsmall
: small text fieldstring
: text fieldinput
: alias for string
, only for backwards compatibility, many extensions depend on thatdefault
: alias for string
, only for backwards compatibility, many extensions depend on thatSource is available here: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/ViewHelpers/Form/TypoScriptConstantsViewHelper.php#L36
On the other hand the TypoScript template constant editor was never rewriten to make use of the FormEngine and has it's own implementation. Here the following types are additionally available:
comment
: a checkbox to switch a constantfiles
: file selectionSource is available here: https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php#L993
That's almost true for the TS constant editor but there is the wrap
type to achieve a multiline like functionality. For the extension configuration there are the small
and string
types.
For the other questions I'm currently not aware of and have to investigate a little bit deeper first: