Dynamic Expressions
Here are the most common uses of expressions
How to use variables in layouts ?
You must always precede the name of your variable with "page.".
Conditionals
Loops
Arrays
Objects
Loop props
While inside a loop, you will have access to a special object called {{ loop }}
. This object provides you with valuable information about the current loop iteration.
loop.index
- the current iteration of the loop (0 indexed)loop.remaining
- number of iterations until the end (0 indexed)loop.first
- boolean indicating if it's the first iterationloop.last
- boolean indicating if it's the last iterationloop.length
- total number of items
Switches
Fetch
Raw
If you want to ignore expressions in a block of code
Last updated