Skip to content

Data

The document's <assets> tag can include its own data tag. The primary advantage of this is that assets are fixed inside the template and can't be changed by the payload. Thus, the assets' data property defines constants.

xml
<assets>
    <data type="json">
        {
            "company": {
                "name": "Papermill"
            }
        }
    </data>
</assets>

Asset data can be referenced using the syntax {{ assets.data... }}. For example,

xml
<p>
    Hello from {{ assets.data.company.name }}!
</p>