Using stdWrap correctly
The stdWrap function is one of the most powerful and
most widely used of all TypoScript. Most properties actually support std
turning each of them into some kind of Swiss army knife.
std is very rich, having itself a large number of properties. This
chapter is intended to give you a feel for std so that you may get
familiar with it and be ready to explore it in greater depth using the
TypoScript Reference.
Details of stdWrap
<strong>Tool: TYPO3</strong>
The `case` property is executed before the `noTrimWrap` property.
Hence only "typo3" was changed to uppercase and not the "Tool:" with which it
is wrapped.
<strong>TOOL: TYPO3</strong>
because we explicitly specified that `noTrimWrap` should happen before
`case`.
It should be noted that `stdWrap` itself has a `stdWrap` property,
meaning that it can be called recursively. In most case `orderedStdWrap`
will do the job and is much easier to understand making code easier to
maintain.
The data type
While writing TypoScript, it is crucial to know what kind of data type you are handling. It is common to see beginners try to combine functions arbitrarily, until the anticipated result is finally achieved by accident.
The TypoScript reference is very clear about which properties exist and what their data type is, so please refer to that essential resource while writing your TypoScript configuration.
cObject
The std property "cObject" can be
used to replace the content with a TypoScript object. This can be a
COA, a plugin or a text like in this
example: