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/dialogs/common/categorization-field.yaml
# an include within a map, here adding a tab
actions: !include /documentation-examples-templates/dialogs/common/actions-block.yaml

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

Path conventions:

  • Absolute path starting with /<module-name>. (This directory within a Maven-based module would be src/main/resources/<module-name>. See Module structure).
  • Same kind of definitions only. The file which includes and the file to be included must be of the same type.
    • (tick) file /my-module/dialogs/mydialog.yaml can include /my-module/dialogs/common-actions.yaml 
    • (tick) file /my-module/dialogs/mydialog.yaml can include /mte/dialogs/default-actions.yaml 
    • (error) file /my-module/dialogs/mydialog.yaml cannot include /my-module/apps/actions.yaml 
  • No labels