How to set up conditions

  • Condition: Enter the condition which determines whether or not this element will be added to the document at print time.

    Use JavaScript conditional expressions to construct your condition.
    You may use JavaScript logical operators (==, !=, <, >, &&, ||, etc.), literal values ("text', 3.14, etc.), mathematical operators (/, *, +, -, etc.) and data fields.

    • Add: Click to add a field to the to the conditional expression.
      Select from a list of metadata fields (as added in Metadata Options), document information fields (see Variables Available in Output), or common expressions.

      For example, selecting the Expressions > First Page would add "page.nr == 1" to the conditional entry.
      Example: if (page.nr == 1) { ... }

Examples

Example: "page.nr == 1"

This condition means the additional content can only be added to the first page.

Example: "page.banner"

With this condition, the additional content will only be added to banner pages.

Example: page.banner && page.front

This condition determines that the page must be both a banner page and a front page. In case of duplex banner pages, this prevents content from appearing at the back of the banner page.

Example: page.content

This condition prevents additional content from appearing on banner pages. It is true for all pages that are part of the content, and false for banner pages.