Simple Object Types
String, integer, number, and boolean — types with no child properties.
Simple object types have no child properties. They are the most basic kind of data. Complex objects often must be converted to a simple type before they can be used inside methods and filters.
string, integer, number, and boolean are documented on this page. Lists are not simple types — see Working with Lists. Reserved names such as null and empty are documented under Symbols.
string
Text with no child properties: the empty string (""), a single character ("a"), or the full HTML output of a rendered template. When used alone in a conditional, every string evaluates as true — including "", "0", and "false".
Strings can be enumerated with {% for %}, in which case each item is a single character. For most other purposes a string is a single value, so {% if "string" is_list %} is false.
integer
A whole number with no child properties, including 0 and negatives (for example -2, -1, 0, 1, 2). Integers are a type of number. Any integer — including 0 — evaluates as true when used alone in a conditional.
number
A numeric value with no child properties: integers, decimals, or fractions, including 0. Integers are a type of number. Any number — including 0 — evaluates as true when used alone in a conditional.
boolean
True or false. The literals true and false may be used anywhere a boolean value is used.