Referencing Global Variables


Prerequisites: Global variables must be set up.

You can reference global variables in plain text and XHTML editor elements via the Edit tab of pages and components.

Note
Alternatively, administrators can reference global variables directly in the page or component schema. They can reference the variable in the Default Value field of plain text and XHTML editor elements via Administration > Schema Designer. See how to manually enter the global variable reference in the steps below.
To reference global variables in content items:
  1. Navigate to Site > Site Tree.
  2. Open the checked-out content item, in the Edit tab, go to the plain text or XHTML editor element where you want to reference the global variable.
  3. Choose one of the following steps:
    • Right-click element value, and select Insert Static Global Variable > [name of your static variable] or Insert Dynamic Global Variable > [name of your dynamic variable].
      Note
      This feature is only available for plain text elements.

      Insert Global Variable Context Menu

    • Place your cursor in the element and enter @{name-of-your-global-variable}.

      For example, if your global variable's name is tagline, then enter @{tagline} to reference the global variable.

      Manually Enter Global Variable

  4. Click SaveSave Button in the Edit tab toolbar to confirm your changes.

Next Steps (optional):

You can click the Preview tab to preview the value of the global variable you referenced. If the variable has values specified for individual publishing targets, select the appropriate publishing target from the drop-down list in the Site Tree pane.

Site Tree Publishing Target Drop-Down List