Page tree
Skip to end of metadata
Go to start of metadata

Instead of adding a list item or a value of a map entry you can include a file.

  label: Example page properties
    - name: tabText
      label: Texts and categories
        - name: title
          class: info.magnolia.ui.form.field.definition.TextFieldDefinition
          label: Title and categories
          i18n: true
        # an include within a list, here adding a field
        - !include /documentation-examples-templates/includes/categorization-field.yaml
# an include within a map, here adding a tab
actions: !include /documentation-examples-templates/includes/actions-block.yaml

The !include directive is Magnolia specific. The ! is a special character in YAML for a non-specific tag, see

Best practice

Typically you include YAML snippets which are not proper definition. Do not add these snippets to the folders which are meant for definitions (templates, dialogs, app) and which are scanned for definitions by the system. Instead add these snippets to a folder which is not scanned such as /<your-module>/includes/.

  • No labels