Text Blocks and Data Definitions

If the statement TEXTBLOCK is used in FOREACH WIZARD and FOREACH NODE loops, the context of the FOREACH WIZARD and FOREACH NODE statements is used to automatically determine the location of the Text Block in the Content Wizard. If the Content Wizard uses Data Backbone to support repeating groups and the FOREACH WIZARD loop is in a Data Definition Group, the current iteration of the Data Definition Group elements is determined to pick Field Sets in that loop. This ensures that Text Blocks in a repeating group refer to the correct iteration.

If the statement TEXTBLOCK is used outside any FOREACH WIZARD loops, or Field Sets cannot be located in the Data Backbone, the Field Sets are additionally searched for in the current scope in the Master Template.

You can use the keywords DATA_DEFINITION and PATH to change the default behavior. You can use the keyword DATA_DEFINITION to disable the use of the _data variable and limit the use of Field Sets to local variables.

The keyword PATH indicates a location in the Data Backbone where the Text Block tries to locate Field Sets. Only values copied from the Field Path in the statement FOREACH WIZARD can be used with the keyword PATH. Use PATH NONE to ignore any repeating or nested structures in the Data Backbone.

In the following example, the Text Block using the currently active FOREACH WIZARD context is inserted.

TEXTBLOCK
  NAME "..."

The following example demonstrates that any applicable FOREACH WIZARD context is ignored and Field Sets that are currently in scope are used.

TEXTBLOCK
  NAME "..."
  DATA_DEFINITION NONE
  PATH NONE

The following example shows that the variable my_path is used to determine the active Data Definition context. This can be used outside FOREACH WIZARD loops to control the context in which the Text Block is produced. The variable _data is used to retrieve the content.

TEXTBLOCK
  NAME text_block
  PATH my_path