Using Context References

Insert dynamic references to environment and collection metadata in property values, resolved automatically at runtime.

Overview

You can now insert dynamic references into property values when configuring collection properties or environment properties.

These references automatically pull information from the current Environment or Collection, so you don’t have to hard-code values.

When the environment runs, the reference will be replaced with the actual value.

Available References

Environment References

Reference
Description
Example Output

${{bricks.environment.slug}}

The unique slug of the environment.

payments-prod

${{bricks.environment.package}}

The blueprint or package assigned to the environment.

@bluebricks/payments_blueprint

${{bricks.environment.created_time}}

The date/time the environment was created. (Only works for existing environments)

2025-06-30T09:27:14Z

triangle-exclamation

Collection References

Reference
Description
Example Output

${{bricks.collection.slug}}

The unique slug of the collection.

prod

${{bricks.collection.name}}

The display name of the collection.

Production

How It Works

Anywhere you can type a property value, you can use:

When the environment starts, these placeholders are replaced with the real values from your Bluebricks setup.

Example Usage

Collection Properties Page

You can set a property to dynamically reference the collection name:

When deployed to Production collection, this becomes:

Environment Page

You can set a property to dynamically reference the environment name:

When deployed the property will be resolved as:

Last updated

Was this helpful?