Fluid Syntax: Variables

Accessing variables

Variables in Fluid can be accessed with the following syntax:

<h1>{title}</h1>
Copied!

Arrays and objects

Use the dot . to access array keys:

<p>{data.0}, {data.1}</p>
Copied!

This also works for object properties:

<p>{product.name}: {product.price}</p>
Copied!

Dynamic keys/properties

It is possible to access array or object values by a dynamic index:

{myArray.{myIndex}}
Copied!

Reserved variable names

The following variable names are reserved and may not be used:

  • _all
  • true
  • false
  • null