Expressions
Learn how to write expressions for Yumdocs.
Yumdocs uses a custom implementation of JEXL by default, but can be configured to use any expression engine.
Object properties
Object properties are in the form "name": value
where value
can be a string (between quotes),
a boolean (true or false), a number, an object (between curly braces) or an array (between square brackets).
An object is a collection of properties. An array is a collection of values.
A property is evaluated by its name. If the value of a property is an object (e.g person), a dot is used to access
the properties of this object (e.g. person.firstName
), which you can experiment in the following playground:
Array items
An array item is most commonly accessed by its index in square brackets as in organization.members[0]
,
but expressions can also include queries, which you can experiment in the following playground:
Concatenation
Expressions support concatenation, which you can experiment in the following playground:
Calculations
Expressions support calculations, which you can experiment in the following playground:
Conditions
Expressions support conditions, which you can experiment in the following playground: