Create and Edit Variables and Constants

Each page and Layout has a Variables tab with an editor where you can edit variables and constants you've created as well as those defined in dependencies. Variables and constants that are defined in a dependency are labeled with the name of the dependency, and will have fewer editable attributes than those you create yourself.

To edit a variable or constant in the Variables tab:

  1. Open the page or Layout you want to configure.
    If you open a page in the Page Designer, the editable constants used in the page are listed in the Constants tab in the page's Properties pane.
  2. Open the Variables tab of the page or Layout, and then select the constant or variable.

    The editor lists all the variables and constants that can be used, even the ones that are not currently used.

    In this example, a constant defined in a dependency is selected in the Variables tab:



    In the image above, the constant listed in the Variables tab is defined in a dependency, and extensions can read and override the constant's value. The check mark next to the constant tells you that the dependency developer has made it readable and writable by extensions.

    If the dependency developer has marked a variable as one that extensions can use, there will be a check mark in the "Extension Read" column. If the variable can be configured by an extension, there will be a check mark in the "Extension Write" column.

  3. Edit the properties of the constants and variables in the Properties pane.

    When editing variables and constants defined in a dependency, the dependency developer sets the properties that you can change.

    For variables and constants you've created, you can edit the properties in the General tab in the Properties pane, and add event listeners in the Events tab if you want to trigger an action chain. You can also use the Design Time tab to customize how variables and constants are displayed in the Properties pane. See Create Variables.

    To edit the JSON file where a variable is defined, right-click the variable name in the tab and choose Go to Code in the menu: