Bind Fragment Input Parameters to Page Constants

When a fragment is used in a page, you can bind its input parameters to page constants. This way, the value of the constant becomes the value of the input parameter. So if the constant's value is changed, that new value is passed to the fragment input parameter it is bound to. Further, if these constants are exposed to extension authors, it gives them the ability to effectively see and control the fragment input parameter values, something they wouldn't normally have access to.

After a fragment (with variables enabled as input parameters) is added to a page, here's how to bind the fragment input parameter to a page constant:

  1. Select the fragment used on the page, then look for the Input Parameters available to the page on the fragment's Properties pane:

    Take note of the object-type nameAndHireDate fragment input parameter whose default values display on the page in the Name and Hire Date fields. Let's assume that the page author has defined a pageObject constant to provide different values for this fragment input parameter.
  2. Click Select Variable on the nameAndHireDate input parameter, then select pageObject under Page and Constants:

  3. Use the constant's default value if one is defined (for example, Liza Doolittle and 2023-01-25), or enter new values:

    The constant that the input parameter is bound to appears next to Bound to. You can click the expression ($constants.pageObject) to view the constant's definition on the page-level Variables editor.