---
title: "Data sources"
manual: "Handlebars"
version: "main"
permalink: "https://docs.typo3.org/permalink/cpsit/typo3-handlebars:usage-data-sources@main"
source: "Usage/DataSources.rst"
rendered: "2026-09-29T09:05:57+00:00"
---

# Data sources {#usage-data-sources}

Data processors often need to work on data that was prepared earlier, for
example the files returned by TYPO3's `files` processor or an
object assigned by an Extbase controller. The data processors provided by this
extension can read such data from so-called *data sources*.

-   [Available data sources](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:available-data-sources@main)
-   [Referencing data](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:referencing-data@main)
-   [Using the current value](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:using-the-current-value@main)

## Available data sources {#usage-data-sources-overview}

| Data source identifier | Contains |
| --- | --- |
| `processorConfiguration` | This processor's own config block |
| `processedData` | Output of previous processors and variables |
| `contentObjectRenderer` | Current record's field values |
| `contentObjectConfiguration` | `HANDLEBARSTEMPLATE` configuration, or the configuration forwarded by a parent processor |

## Referencing data {#usage-data-sources-payload}

Processors such as [process-each](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:data-processor-process-each@main) accept a
`dataSource` option that tells them which data to work on. Some
processors use a more specific option name for the same purpose, e.g.
`iterable` ([iterable-to-array](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:data-processor-iterable-to-array@main)),
`object` ([object-access](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:data-processor-object-access@main)) or
`file` ([media](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:data-processor-media@main)).

A reference consists of the data source identifier, a colon and the key
within that data source. Nested keys are separated by `/`:

```typoscript
dataProcessing {
    10 = files
    10 {
        references.fieldName = image
        as = files
    }

    # All files
    20 = process-each
    20 {
        dataSource = processedData:files
        # ...
    }

    # The first file only
    30 = media
    30 {
        file = processedData:files/0
        as = image
    }
}
```

Instead of referencing existing data, inline data can be configured with
the `data` option:

```typoscript
20 = process-each
20 {
    data {
        10 = foo
        20 = bar
    }
}
```

If a reference cannot be resolved, a warning is logged and the processor
leaves the processed data unchanged.

> [!NOTE]
> **See also**
>
> [Data source resolution](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:developer-corner-data-sources@main) for the complete resolution rules,
> e.g. how multiple references are merged.

## Using the current value {#usage-data-sources-current}

Processors that run nested inside [process-each](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:data-processor-process-each@main) or
[iterable-to-array](https://docs.typo3.org/permalink/cpsit/typo3-handlebars:data-processor-iterable-to-array@main) receive the item currently being
processed as the content object's *current value*. Set `current = 1`
as sub-property of the data source option to use it. This works for all
processors listed above, e.g. `dataSource.current`,
`object.current` or `iterable.current`:

```typoscript
20 = process-each
20 {
    dataSource = processedData:files
    as = processedFiles

    dataProcessing {
        10 = object-access
        10 {
            object.current = 1
            path = publicUrl
            as = url
        }
    }
}
```

Alternatively, the item can be referenced as
`contentObjectConfiguration:currentValue`.
