{{ document.set }} – Set Variable Value

Sets a global variable value that can be accessed in included layouts.

Basic usage:

{{ document.set }}

Usage with parameters:

{{ document.set(Variable, Value) }}

Parameters:

  1. Variable (optional) – The variable ‘speed’ is now available in included layouts. For example, you can display it like this: The speed is {{ document.get(‘speed’) }}.
  2. Value (optional) – The value to assign to the specified variable.

Example:

{{ document.set("{{ document.set('speed', 65) }}") }}


What are your feelings

Leave a Reply

Updated on January 9, 2025