Skip to content

Data

A content flow (or content flow group) can declare a <data> element which stores relevant information accessible by any element within the flow/group, or by a page which has the flow/group in "scope" (see layout repeats).

For example,

xml
<flows>
  <body>
    <data>
      <title>My Life Story</title>
    </data>

    <p>When I was a young man...</p>
  </body>
</flows>

<pages width="595pt" height="842pt" padding="72pt">
  <introduction>
    <h1>{{ body.data.title }}</h1>
    
    <flow name="body" />
  </introduction>

  <body-page>
    <p font-size="8pt">{{ body.data.title }}</p>
    
    <flow name="body" />
  </body-page>
</pages>

<layout>
  <introduction />
  <body-page repeat="true" />
</layout>

defines a simple document which begins with a large title on the first page, then includes that title at the top of every subsequent page.