Sections

Sections use block tags and a # prefix. Use sections to render content based on the values contained in the data reference. For example, the Guide template and the data reference provide the output displayed.

You can also use a . character with data from an array to refer to the current item in the list.

You can include a region attribute to treat the section as an impression region for reporting purposes:

If the template references an empty data source, the template will render no content. If the template references a function, the template passes the inner markup of the block tag to the function for processing. For all other values, the template renders the inner markup once.

Note that Mustache or Handlebars syntax does not support the region attribute or the . character for arrays.

Change the # prefix to ^ to invert the section. Use inverted section to render content when the data reference contains an empty value. For example, the Guide template and the data reference provide the output displayed: