Appearance
Data
A .press document's <data> element contains static data that can be referenced throughout the document.
For example
xml
<data>
<date>23/06/2025</date>
<topics>
<topic>Press Pages</topic>
<topic>Press Components</topic>
...
</topics>
</data>Data References
Data references take the form {{ ... }} and can appear anywhere in text or an attribute value.
The first part of a data reference selects the data object in question. These can be:
- The document's global data object (referenced by
data) - A content flow's data object (referenced by
flows.{flow name}.data) - Scoped variables (e.g. as part of a data repeat)
Once the data object has been selected, children can be referenced using:
- Direct accesses via name, e.g.
{{ data.date }}used on the above example would become "23/06/2025" - Accesses via index, e.g.
{{ data.topics[1] }}used on the above example would become "Press Components"
Data references can be used as attribute values, e.g. <img src="{{ data.images[4] }} " /> or directly in text e.g. <p>This report was written by {{ data.author }}</p>.