Data Directives

Directives wrapped in <@@ @@> specify a property on the expansion object. The directive is replaced with the string representation of the value of the specified property. The following shows an example of the format of a data directive.

<@@ name @@>

If the expansion object has no property with the specified name, the directive is expanded to an empty string. For example, a template could contain the following:

<div class="item">
    <h1><@@ title @@></h1>
    <p><@@ summary @@></p>
    <p>Amount: <@@ count @@></p>
</div>

An expansion object could have the following properties.

title: "Hello world"
summary: "This is a test"
count: 42

Binding the previous template to the expansion object produces the following result.

<div class="item">
    <h1>Hello world</h1>
    <p>This is a test</p>
    <p>Amount: 42</p>
</div>