Data sources
Several data processors resolve part of their configuration, or their whole
input payload, from one or more data sources made available during
TypoScript
data. This page describes the concept
once; see iterable-to-array,
object-access, process-each and
process-variables for how each processor applies it.
Overview
| Data source identifier | Contains |
|---|---|
processor | This processor's own config block |
processed | Accumulated output from previous processors |
content | Current record's field values |
content | Top-level
HANDLEBARSTEMPLATE
config |
Not every source necessarily holds what its name suggests. A processor
invoked through TYPO3's
data chain always receives a
content, but once it is nested inside
another processor's own
data, that value is no
longer the top-level
HANDLEBARSTEMPLATE
configuration — it is
whatever the parent processor forwards instead (its own config block, for
example). The collection built for
HANDLEBARSTEMPLATE
's own
pre/
post hooks, which run
before
data itself, sets only
content and
processor;
content and
processed are
genuinely absent there.
Priority order
When a lookup is not restricted to a specific source, all sources that are actually available are searched in priority order, highest first:
processorConfiguration processedData contentObject Renderer contentObject Configuration
The first source that has the requested key wins; sources are never merged
for this kind of lookup. This is why an option like
table
, set
by an outer processor, can be picked up by a nested processor without being
repeated explicitly — as long as the nested processor actually queries that
source (some processors restrict a given option to a specific source, or a
specific subset, rather than searching all four).
Resolving a data payload (dataSource / data)
process-each and process-variables
accept a
data (or inline
data
) option to
pick the actual payload they operate on, independently of whatever their own
configuration otherwise resolves from the four sources above.
iterable-to-array and object-access
use the exact same mechanism under a processor-specific option name —
iterable
and
object
respectively — instead of the
generic
data.
data(or the processor-specific option name)Source -
One or more data source references, each optionally scoped to a sub-path with a colon (e.g.
processed). A single reference is resolved and used as-is, whatever its type — it is not coerced into an array.Data: files Multiple references, configured as a TypoScript array with numeric keys, are resolved in ascending key order:
- If every reference resolves to an array, they are merged, with later references overriding earlier ones on key conflicts.
- If any reference does not resolve to an array, the last resolved reference wins outright — all earlier references, including any that were arrays, are discarded rather than partially merged.
A warning is logged, and the payload cannot be resolved, if the option is empty, references an unsupported data source identifier, a data source that is missing in the current context, or a sub-path that does not exist within a data source. Note that an unconfigured option (rather than one configured with an invalid value) is not itself an error — see the fallback below and each processor's own documentation for what happens next.
data- Inline data, used as a fallback if the option above is not configured
at all. This fallback always uses the fixed key
data(data.for an inline array inprocessor, or a plainConfiguration datakey already present inprocessed), regardless of what the primary option is called for a given processor.Data
See each processor's own documentation for further, processor-specific fallbacks once neither option yields a value.