Properties in Sufio templates are of one of the basic data types below, such as boolean
, number
, or string
.
Most properties are also implemented as node
objects, which means they can output their formatted values as well as additional information about the property.
Each property is of one of the following data types.
A complete address in a country-specific format according to the language of your document.
Depending on the country-specific format, the address may contain the following fields:
address.city
address.country
address.country_code
address.postal_code
address.region
address.region_code
address.street
Use the field as an attribute to return only that field:
A numerical value representing a financial amount. You can format the value as a price, perform numerical operations, or apply one of the math filters, for example, sum
.
A date or a datetime, in ISO 8601 format.
Use the format_date
filter to return the date in the format based on the document language.
Numeric values, including floats and integers. You can perform numerical operations or apply one of the math filters to number
properties.
Most properties in Sufio templates are implemented as node
objects.
node
objects can return both the underlying values of properties (e.g., 12.3
) and their formatted versions (e.g., €12.30
). These objects also include additional information about each property, such as its type, ID, or name.
Instead of formatting each property manually in the document template, node
objects allow you to do this automatically. For example, you can use a
simple iterator to display correctly formatted properties of different
types—such as item names, quantities, and unit prices.
CSS classes that should be applied to the HTML element that renders the property in the template.
These might include various classes related to the data_type
and name
of the property and its status.
The data type of the property. Possible types:
A boolean value which indicates if the property should be visible on the document. This depends on the document type, your settings on the Design page, and whether the property has a value.
If True
, the item should be visible.
Note
You can always access property values or use them in conditional statements in the template, regardless of whether the properties are visible or not.
The formatted value of the property, which can be also be translated to the document language or formatted in the language-specific format.